Revision fc3e5e6e
Added by Katja Luther over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/ChecklistEditorGeneralPreference.java | ||
---|---|---|
115 | 115 |
|
116 | 116 |
int index = 0; |
117 | 117 |
for (String itemLabel : activateCombo.getItems()) { |
118 |
if (isEditorActivated == null && itemLabel.equals(Messages.Preference_Use_Default)) {
|
|
118 |
if (isEditorActivated == null && itemLabel.startsWith(Messages.Preference_Use_Default)) {
|
|
119 | 119 |
activateCombo.select(index); |
120 | 120 |
break; |
121 | 121 |
} |
... | ... | |
163 | 163 |
PreferencePredicate.ShowRankInDistributionEditor, Messages.ChecklistEditorGeneralPreference_show_rank, isAdminPreference); |
164 | 164 |
index = 0; |
165 | 165 |
for (String itemLabel : activateRankCombo.getItems()) { |
166 |
if (isShowRank == null && itemLabel.equals(Messages.Preference_Use_Default)) {
|
|
166 |
if (isShowRank == null && itemLabel.startsWith(Messages.Preference_Use_Default)) {
|
|
167 | 167 |
activateRankCombo.select(index); |
168 | 168 |
break; |
169 | 169 |
} |
... | ... | |
206 | 206 |
areaOrder = TermOrder.IdInVoc; |
207 | 207 |
} |
208 | 208 |
for (String itemLabel : areaOrderSelectionCombo.getItems()) { |
209 |
if (itemLabel.equals(Messages.Preference_Use_Default) && orderAreas.equals(Messages.Preference_Use_Default)){
|
|
209 |
if (itemLabel.startsWith(Messages.Preference_Use_Default) && orderAreas == null){
|
|
210 | 210 |
areaOrderSelectionCombo.select(index); |
211 | 211 |
break; |
212 | 212 |
} |
... | ... | |
252 | 252 |
areaDisplay = TermDisplayEnum.Title; |
253 | 253 |
} |
254 | 254 |
for (String itemLabel : areaDisplaySelectionCombo.getItems()) { |
255 |
if (itemLabel.equals(Messages.Preference_Use_Default) && displayArea.equals(Messages.Preference_Use_Default)){
|
|
255 |
if (itemLabel.startsWith(Messages.Preference_Use_Default) && displayArea == null){
|
|
256 | 256 |
areaDisplaySelectionCombo.select(index); |
257 | 257 |
break; |
258 | 258 |
} |
... | ... | |
294 | 294 |
statusDisplay = TermDisplayEnum.Title; |
295 | 295 |
} |
296 | 296 |
for (String itemLabel : statusDisplaySelectionCombo.getItems()) { |
297 |
if (itemLabel.equals(Messages.Preference_Use_Default) && displayStatus.equals(Messages.Preference_Use_Default)){
|
|
297 |
if (itemLabel.startsWith(Messages.Preference_Use_Default) && displayStatus == null){
|
|
298 | 298 |
statusDisplaySelectionCombo.select(index); |
299 | 299 |
break; |
300 | 300 |
} |
... | ... | |
337 | 337 |
statusComboDisplay = TermComboEnum.Title; |
338 | 338 |
} |
339 | 339 |
for (String itemLabel : statusDisplayInComboSelectionCombo.getItems()) { |
340 |
if (itemLabel.equals(Messages.Preference_Use_Default) && displayStatusCombo.equals(Messages.Preference_Use_Default)){
|
|
340 |
if (itemLabel.startsWith(Messages.Preference_Use_Default) && displayStatusCombo == null){
|
|
341 | 341 |
statusDisplayInComboSelectionCombo.select(index); |
342 | 342 |
break; |
343 | 343 |
} |
... | ... | |
788 | 788 |
setApply(true); |
789 | 789 |
|
790 | 790 |
isEditorActivated = null; |
791 |
activateCombo.select(0); |
|
791 | 792 |
|
792 |
if (isEditorActivated == null) { |
|
793 |
activateCombo.select(0); |
|
794 |
} else if (isEditorActivated){ |
|
795 |
activateCombo.select(1); |
|
796 |
} else{ |
|
797 |
activateCombo.select(2); |
|
798 |
} |
|
799 | 793 |
|
800 |
displayArea = Messages.Preference_Use_Default;
|
|
794 |
displayArea = null;
|
|
801 | 795 |
|
802 | 796 |
int index = 0; |
803 | 797 |
for (String itemLabel : areaDisplaySelectionCombo.getItems()) { |
804 |
if (itemLabel.equalsIgnoreCase(Messages.Preference_Use_Default)) {
|
|
798 |
if (itemLabel.startsWith(Messages.Preference_Use_Default)) {
|
|
805 | 799 |
areaDisplaySelectionCombo.select(index); |
806 | 800 |
break; |
807 | 801 |
} |
808 | 802 |
index++; |
809 | 803 |
} |
810 | 804 |
|
811 |
displayStatus = Messages.Preference_Use_Default;
|
|
805 |
displayStatus = null;
|
|
812 | 806 |
|
813 | 807 |
|
814 | 808 |
|
815 | 809 |
index = 0; |
816 | 810 |
for (String itemLabel : statusDisplaySelectionCombo.getItems()) { |
817 |
if (itemLabel.equalsIgnoreCase(displayStatus)) {
|
|
811 |
if (itemLabel.startsWith(Messages.Preference_Use_Default)) {
|
|
818 | 812 |
statusDisplaySelectionCombo.select(index); |
819 | 813 |
break; |
820 | 814 |
} |
821 | 815 |
index++; |
822 | 816 |
} |
823 | 817 |
|
824 |
orderAreas = Messages.Preference_Use_Default;
|
|
818 |
orderAreas = null;
|
|
825 | 819 |
|
826 | 820 |
|
827 | 821 |
index = 0; |
828 |
if (PreferencesUtil.getStringValue(PreferencePredicate.DistributionEditorActivated.getKey()) != null) { |
|
829 |
|
|
830 |
for (String itemLabel : areaOrderSelectionCombo.getItems()) { |
|
831 |
if (itemLabel.equalsIgnoreCase(orderAreas)) { |
|
832 |
areaOrderSelectionCombo.select(index); |
|
833 |
break; |
|
834 |
} |
|
835 |
index++; |
|
822 |
for (String itemLabel : areaOrderSelectionCombo.getItems()) { |
|
823 |
if (itemLabel.startsWith(Messages.Preference_Use_Default)) { |
|
824 |
areaOrderSelectionCombo.select(index); |
|
825 |
break; |
|
836 | 826 |
} |
827 |
index++; |
|
837 | 828 |
} |
838 | 829 |
|
839 | 830 |
|
... | ... | |
841 | 832 |
|
842 | 833 |
index = 0; |
843 | 834 |
for (String itemLabel : activateRankCombo.getItems()) { |
844 |
if (itemLabel.equalsIgnoreCase(Messages.Preference_Use_Default)) {
|
|
835 |
if (itemLabel.startsWith(Messages.Preference_Use_Default)) {
|
|
845 | 836 |
activateRankCombo.select(index); |
846 | 837 |
break; |
847 | 838 |
} |
... | ... | |
851 | 842 |
displayStatusCombo = null; |
852 | 843 |
index = 0; |
853 | 844 |
for (String itemLabel : statusDisplayInComboSelectionCombo.getItems()) { |
854 |
if (itemLabel.equalsIgnoreCase(Messages.Preference_Use_Default)) {
|
|
845 |
if (itemLabel.startsWith(Messages.Preference_Use_Default)) {
|
|
855 | 846 |
statusDisplayInComboSelectionCombo.select(index); |
856 | 847 |
break; |
857 | 848 |
} |
858 | 849 |
index++; |
859 | 850 |
} |
860 | 851 |
|
861 |
ownDescriptionForDistributionEditor = Boolean |
|
862 |
.valueOf(PreferencePredicate.OwnDescriptionForDistributionEditor.getDefaultValue().toString()); |
|
852 |
ownDescriptionForDistributionEditor = null; |
|
863 | 853 |
|
864 | 854 |
allowOverrideActivatedButton.setSelection(true); |
865 | 855 |
overrideActivated = true; |
Also available in: Unified diff
ref #8385: fixes in preferences - continue