Changeset 3450 in josm


Ignore:
Timestamp:
2010-08-20T21:56:22+02:00 (14 years ago)
Author:
bastiK
Message:

Purge+Clear Undo/Redo should free memory - remove references by clearing selection history

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r3431 r3450  
    174174        if (cbClearUndoRedo.isSelected()) {
    175175            Main.main.undoRedo.clean();
     176            Main.map.selectionListDialog.clearSelectionHistory();
    176177        }
    177178    }
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r3443 r3450  
    7676    public ConflictDialog conflictDialog;
    7777    public FilterDialog filterDialog;
    78     /**
    79      * The dialog that shows all relations and lets the user edit them.
    80      */
    8178    public RelationListDialog relationListDialog;
     79    public SelectionListDialog selectionListDialog;
    8280    /**
    8381     * The panel list of all toggle dialog icons. To add new toggle dialog actions, use addToggleDialog
     
    157155        addToggleDialog(LayerListDialog.getInstance());
    158156        addToggleDialog(new PropertiesDialog(this));
    159         addToggleDialog(new SelectionListDialog());
     157        addToggleDialog(selectionListDialog = new SelectionListDialog());
    160158        addToggleDialog(relationListDialog = new RelationListDialog());
    161159        addToggleDialog(new CommandStackDialog(this));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r3361 r3450  
    221221    }
    222222
     223    public void clearSelectionHistory() {
     224        model.clearSelectionHistory();
     225    }
     226
    223227    /**
    224228     * Responds to double clicks on the list of selected objects
     
    542546        public List<Collection<? extends OsmPrimitive>> getSelectionHistory() {
    543547            return history;
     548        }
     549
     550        public void clearSelectionHistory() {
     551            history.clear();
    544552        }
    545553
Note: See TracChangeset for help on using the changeset viewer.