Changeset 5310 in josm
- Timestamp:
- 2012-06-30T20:14:38+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java
r5301 r5310 68 68 int row = rows[0]; 69 69 OsmDataLayer layer = this.table.getLayer(); 70 OsmPrimitive primitive = this.table.getPrimitive ToZoomTo(row, layer);70 OsmPrimitive primitive = this.table.getPrimitiveInLayer(row, layer); 71 71 if (layer != null && primitive != null) { 72 72 layer.data.setSelected(primitive); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/PairTable.java
r5301 r5310 24 24 25 25 @Override 26 public OsmPrimitive getPrimitive ToZoomTo(int row, OsmDataLayer layer) {27 OsmPrimitive result = super.getPrimitive ToZoomTo(row, layer);26 public OsmPrimitive getPrimitiveInLayer(int row, OsmDataLayer layer) { 27 OsmPrimitive result = super.getPrimitiveInLayer(row, layer); 28 28 if (model != null && result != null && layer != null && result.getDataSet() != layer.data) { 29 29 result = model.getMyPrimitiveById(result); -
trunk/src/org/openstreetmap/josm/gui/widgets/OsmPrimitivesTable.java
r5301 r5310 71 71 MapView.removeLayerChangeListener(zoomToAction); 72 72 } 73 74 public OsmPrimitive getPrimitive ToZoomTo(int row, OsmDataLayer layer) {73 74 public OsmPrimitive getPrimitiveInLayer(int row, OsmDataLayer layer) { 75 75 return getOsmPrimitivesTableModel().getReferredPrimitive(row); 76 76 } … … 99 99 int row = rowAtPoint(e.getPoint()); 100 100 if (row < 0) return; 101 OsmPrimitive primitive = get OsmPrimitivesTableModel().getReferredPrimitive(row);101 OsmPrimitive primitive = getPrimitiveInLayer(row, layer); 102 102 if (layer != null && primitive != null) { 103 103 layer.data.setSelected(primitive.getPrimitiveId()); … … 108 108 int row = rowAtPoint(e.getPoint()); 109 109 if (row < 0) return; 110 OsmPrimitive primitive = get OsmPrimitivesTableModel().getReferredPrimitive(row);110 OsmPrimitive primitive = getPrimitiveInLayer(row, layer); 111 111 getSelectionModel().addSelectionInterval(row, row); 112 112 if (layer != null && primitive != null) {
Note:
See TracChangeset
for help on using the changeset viewer.