Ignore:
Timestamp:
2012-07-25T00:33:41+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #7776 - Selection of deleted objects

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

Legend:

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

    r4459 r5360  
    127127            Main.main.getEditLayer().data.addDataSetListener(inActiveDataLayerModel);
    128128            inActiveDataLayerModel.initFromDataSet(Main.main.getEditLayer().data);
    129             inSelectionModel.initFromPrimitives(Main.main.getEditLayer().data.getSelected());
     129            inSelectionModel.initFromPrimitives(Main.main.getEditLayer().data.getAllSelected());
    130130        }
    131131    }
     
    234234    protected void initWithCurrentData() {
    235235        if (Main.main.getEditLayer() != null) {
    236             inSelectionModel.initFromPrimitives(Main.main.getEditLayer().data.getSelected());
     236            inSelectionModel.initFromPrimitives(Main.main.getEditLayer().data.getAllSelected());
    237237            inActiveDataLayerModel.initFromDataSet(Main.main.getEditLayer().data);
    238238        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java

    r5200 r5360  
    121121            model.selectionChanged(null);
    122122        } else {
    123             model.selectionChanged(Main.main.getCurrentDataSet().getSelected());
     123            model.selectionChanged(Main.main.getCurrentDataSet().getAllSelected());
    124124        }
    125125    }
     
    197197            if (Main.main.getCurrentDataSet() == null)
    198198                return;
    199             for (OsmPrimitive primitive: Main.main.getCurrentDataSet().getSelected()) {
     199            for (OsmPrimitive primitive: Main.main.getCurrentDataSet().getAllSelected()) {
    200200                if (primitive.isNew()) {
    201201                    continue;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java

    r5328 r5360  
    319319
    320320    protected void createMapPaintText() {
    321         final Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected();
     321        final Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getAllSelected();
    322322        ElemStyles elemstyles = MapPaintStyles.getStyles();
    323323        NavigatableComponent nc = Main.map.mapView;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r5266 r5360  
    161161        model.editLayerChanged(null, Main.map.mapView.getEditLayer());
    162162        if (Main.map.mapView.getEditLayer() != null) {
    163             model.setJOSMSelection(Main.map.mapView.getEditLayer().data.getSelected());
     163            model.setJOSMSelection(Main.map.mapView.getEditLayer().data.getAllSelected());
    164164        }
    165165        actSearch.updateEnabledState();
     
    664664            } else {
    665665                history = newLayer.data.getSelectionHistory();
    666                 setJOSMSelection(newLayer.data.getSelected());
     666                setJOSMSelection(newLayer.data.getAllSelected());
    667667            }
    668668        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java

    r4982 r5360  
    136136    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
    137137        if (newLayer instanceof OsmDataLayer) {
    138             refresh(((OsmDataLayer) newLayer).data.getSelected());
     138            refresh(((OsmDataLayer) newLayer).data.getAllSelected());
    139139        } else {
    140140            refresh(null);
     
    165165        Layer layer = Main.main.getActiveLayer();
    166166        if (layer instanceof OsmDataLayer) {
    167             refresh(((OsmDataLayer)layer).data.getSelected());
     167            refresh(((OsmDataLayer)layer).data.getAllSelected());
    168168        }
    169169
     
    275275            Layer layer = Main.main.getActiveLayer();
    276276            if (layer instanceof OsmDataLayer) {
    277                 refresh(((OsmDataLayer)layer).data.getSelected());
     277                refresh(((OsmDataLayer)layer).data.getAllSelected());
    278278            }
    279279            setEnabled(false);
     
    390390                users.add(data.get(index).user);
    391391            }
    392             Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getSelected();
     392            Collection<OsmPrimitive> selected = Main.main.getCurrentDataSet().getAllSelected();
    393393            Collection<OsmPrimitive> byUser = new LinkedList<OsmPrimitive>();
    394394            for (OsmPrimitive p : selected) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r5287 r5360  
    168168        DataSet ds = Main.main.getCurrentDataSet();
    169169        if (ds != null) {
    170             updateSelection(ds.getSelected());
     170            updateSelection(ds.getAllSelected());
    171171        }
    172172        MapView.addLayerChangeListener(this);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetInSelectionListModel.java

    r3083 r5360  
    3030            setChangesets(null);
    3131        } else {
    32             initFromPrimitives((newLayer).data.getSelected());
     32            initFromPrimitives((newLayer).data.getAllSelected());
    3333        }
    3434    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java

    r3416 r5360  
    6464        }
    6565        if (newLayer == layer) {
    66             cache.addAll(((OsmDataLayer)newLayer).data.getSelected());
     66            cache.addAll(((OsmDataLayer)newLayer).data.getAllSelected());
    6767        }
    6868        fireTableDataChanged();
     
    102102     */
    103103    protected void populateSelectedPrimitives(OsmDataLayer layer) {
    104         selectionChanged(layer.data.getSelected());
     104        selectionChanged(layer.data.getAllSelected());
    105105    }
    106106
Note: See TracChangeset for help on using the changeset viewer.