Changeset 5310 in josm


Ignore:
Timestamp:
2012-06-30T20:14:38+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #7750 - Conflict dialog: Really selects id:0 primitives without zooming

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

Legend:

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

    r5301 r5310  
    6868        int row = rows[0];
    6969        OsmDataLayer layer = this.table.getLayer();
    70         OsmPrimitive primitive = this.table.getPrimitiveToZoomTo(row, layer);
     70        OsmPrimitive primitive = this.table.getPrimitiveInLayer(row, layer);
    7171        if (layer != null && primitive != null) {
    7272            layer.data.setSelected(primitive);
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/PairTable.java

    r5301 r5310  
    2424
    2525    @Override
    26     public OsmPrimitive getPrimitiveToZoomTo(int row, OsmDataLayer layer) {
    27         OsmPrimitive result = super.getPrimitiveToZoomTo(row, layer);
     26    public OsmPrimitive getPrimitiveInLayer(int row, OsmDataLayer layer) {
     27        OsmPrimitive result = super.getPrimitiveInLayer(row, layer);
    2828        if (model != null && result != null && layer != null && result.getDataSet() != layer.data) {
    2929            result = model.getMyPrimitiveById(result);
  • trunk/src/org/openstreetmap/josm/gui/widgets/OsmPrimitivesTable.java

    r5301 r5310  
    7171        MapView.removeLayerChangeListener(zoomToAction);
    7272    }
    73    
    74     public OsmPrimitive getPrimitiveToZoomTo(int row, OsmDataLayer layer) {
     73       
     74    public OsmPrimitive getPrimitiveInLayer(int row, OsmDataLayer layer) {
    7575        return getOsmPrimitivesTableModel().getReferredPrimitive(row);
    7676    }
     
    9999            int row = rowAtPoint(e.getPoint());
    100100            if (row < 0) return;
    101             OsmPrimitive primitive = getOsmPrimitivesTableModel().getReferredPrimitive(row);
     101            OsmPrimitive primitive = getPrimitiveInLayer(row, layer);
    102102            if (layer != null && primitive != null) {
    103103                layer.data.setSelected(primitive.getPrimitiveId());
     
    108108            int row = rowAtPoint(e.getPoint());
    109109            if (row < 0) return;
    110             OsmPrimitive primitive = getOsmPrimitivesTableModel().getReferredPrimitive(row);
     110            OsmPrimitive primitive = getPrimitiveInLayer(row, layer);
    111111            getSelectionModel().addSelectionInterval(row, row);
    112112            if (layer != null && primitive != null) {
Note: See TracChangeset for help on using the changeset viewer.