Ignore:
Timestamp:
2018-12-04T21:37:01+01:00 (5 years ago)
Author:
GerdP
Message:

see #17040 implement resetSelection() to forget recently selected primitives

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs/properties
Files:
2 edited

Legend:

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

    r14476 r14509  
    568568        if (!isVisible())
    569569            return;
     570        if (event != null && event.getSelection().isEmpty())
     571            editHelper.resetSelection();
    570572        if (tagTable == null)
    571573            return; // selection changed may be received in base class constructor before init
     
    708710        if (e.getSource().getEditLayer() == null) {
    709711            editHelper.saveTagsIfNeeded();
     712            editHelper.resetSelection();
    710713        }
    711714        // it is time to save history of tags
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r14248 r14509  
    133133    public static final ListProperty PROPERTY_RECENT_TAGS = new ListProperty("properties.recent-tags",
    134134            Collections.<String>emptyList());
     135    /** The preference list of tags which should not be remembered, since r9940 */
    135136    public static final StringProperty PROPERTY_TAGS_TO_IGNORE = new StringProperty("properties.recent-tags.ignore",
    136137            new SearchSetting().writeToString());
     
    365366            recentTags.saveToPreference(PROPERTY_RECENT_TAGS);
    366367        }
     368    }
     369
     370    /**
     371     * Forget recently selected primitives to allow GC.
     372     * @since 14509
     373     */
     374    public void resetSelection() {
     375        sel = null;
    367376    }
    368377
Note: See TracChangeset for help on using the changeset viewer.