Ticket #24333: 24333.patch
| File 24333.patch, 1.4 KB (added by , 7 months ago) |
|---|
-
src/org/openstreetmap/josm/gui/dialogs/SearchDialog.java
28 28 import javax.swing.text.Document; 29 29 import javax.swing.text.JTextComponent; 30 30 31 import org.openstreetmap.josm.data.osm.DataSet; 31 32 import org.openstreetmap.josm.data.osm.Filter; 32 33 import org.openstreetmap.josm.data.osm.search.SearchCompiler; 33 34 import org.openstreetmap.josm.data.osm.search.SearchMode; … … 91 92 hcbSearchString = new AutoCompComboBox<>(model); 92 93 this.searchSettings = new SearchSetting(initialValues); 93 94 setContent(buildPanel(options)); 95 96 // See #24333 97 if (!(initialValues instanceof Filter)) { 98 DataSet data = MainApplication.getLayerManager().getActiveDataSet(); 99 if (data != null && data.getSelected().isEmpty()) { 100 remove.setEnabled(false); 101 inSelection.setEnabled(false); 102 if (this.searchSettings.mode == SearchMode.in_selection 103 || this.searchSettings.mode == SearchMode.remove) { 104 this.searchSettings.mode = SearchMode.replace; 105 replace.setSelected(true); 106 } 107 } 108 } 94 109 } 95 110 96 111 /**
