Changeset 18951 in josm
- Timestamp:
- 2024-01-23T10:55:17+01:00 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r17896 r18951 69 69 import org.openstreetmap.josm.io.OsmTransferException; 70 70 import org.openstreetmap.josm.spi.preferences.Config; 71 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 71 72 import org.openstreetmap.josm.tools.ImageProvider; 72 73 import org.openstreetmap.josm.tools.InputMapUtils; … … 588 589 */ 589 590 public void updateSelection(Collection<? extends OsmPrimitive> newSelection) { 590 if (!Config.getPref().getBoolean(ValidatorPrefHelper.PREF_FILTER_BY_SELECTION, false)) 591 return; 592 if (newSelection.isEmpty()) { 591 if (newSelection.isEmpty() || !Config.getPref().getBoolean(ValidatorPrefHelper.PREF_FILTER_BY_SELECTION, false)) 593 592 tree.setFilter(null); 594 }595 tree.setFilter(new HashSet<>(newSelection));593 else 594 tree.setFilter(new HashSet<>(newSelection)); 596 595 } 597 596 … … 731 730 } 732 731 } 732 733 @Override 734 public void preferenceChanged(PreferenceChangeEvent e) { 735 super.preferenceChanged(e); 736 // see #23430: update selection so that filters are applied 737 DataSet ds = MainApplication.getLayerManager().getActiveDataSet(); 738 if (ds != null) { 739 updateSelection(ds.getAllSelected()); 740 } 741 742 } 743 733 744 }
Note:
See TracChangeset
for help on using the changeset viewer.