Changeset 18952 in josm for trunk/src


Ignore:
Timestamp:
2024-01-23T14:05:10+01:00 (10 months ago)
Author:
GerdP
Message:

see #23430: Resetting preference validator.selectionFilter results in broken validator

  • improve performance: only call tree.setFilter() when really needed, as it always triggers buildTree()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r18951 r18952  
    589589     */
    590590    public void updateSelection(Collection<? extends OsmPrimitive> newSelection) {
    591         if (newSelection.isEmpty() || !Config.getPref().getBoolean(ValidatorPrefHelper.PREF_FILTER_BY_SELECTION, false))
     591        if (!Config.getPref().getBoolean(ValidatorPrefHelper.PREF_FILTER_BY_SELECTION, false)) {
     592            if (tree.getFilter() != null)
     593                tree.setFilter(null);
     594            return;
     595        }
     596
     597        if (newSelection.isEmpty())
    592598            tree.setFilter(null);
    593599        else
     
    739745            updateSelection(ds.getAllSelected());
    740746        }
    741 
    742747    }
    743748
Note: See TracChangeset for help on using the changeset viewer.