Changeset 30384 in osm for applications/editors/josm/plugins/utilsplugin2
- Timestamp:
- 2014-04-08T20:32:56+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/build.xml
r30370 r30384 3 3 4 4 <!-- enter the SVN commit message --> 5 <property name="commit.message" value="[josm_utilsplugin2]: multitagger improvements"/>5 <property name="commit.message" value="[josm_utilsplugin2]: usedinways/usedinrealtions; multitagger: center on double-click"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 7 <property name="plugin.main.version" value="6317"/> -
applications/editors/josm/plugins/utilsplugin2/nbproject/project.xml
r28222 r30384 65 65 <compilation-unit> 66 66 <package-root>src</package-root> 67 <classpath mode="compile">../../core/src </classpath>67 <classpath mode="compile">../../core/src;../../core/dist/josm-custom.jar</classpath> 68 68 <source-level>1.6</source-level> 69 69 </compilation-unit> -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/UtilsPlugin2.java
r30343 r30384 29 29 import org.openstreetmap.josm.plugins.utilsplugin2.multitagger.MultiTagAction; 30 30 import org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryAction; 31 import org.openstreetmap.josm.plugins.utilsplugin2.search.UtilsSimpleMatchFactory; 31 32 import org.openstreetmap.josm.plugins.utilsplugin2.search.UtilsUnaryMatchFactory; 32 33 import org.openstreetmap.josm.plugins.utilsplugin2.selection.AdjacentNodesAction; … … 124 125 // register search operators 125 126 SearchCompiler.addMatchFactory(new UtilsUnaryMatchFactory()); 127 SearchCompiler.addMatchFactory(new UtilsSimpleMatchFactory()); 126 128 } 127 129 -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java
r30370 r30384 67 67 private final HighlightHelper highlightHelper = new HighlightHelper(); 68 68 private final HistoryComboBox cbTagSet = new HistoryComboBox(); 69 private List<OsmPrimitive> currentSelection; 69 70 70 71 private static final String HISTORY_KEY = "utilsplugin2.multitaghistory"; … … 72 73 "highway, name, ${id}, ${length}", 73 74 "name name:en name:ru name:de"}; 74 TagCellEditor cellEditor;75 76 75 77 76 public MultiTagDialog() { … … 168 167 @Override 169 168 public void mouseClicked(MouseEvent e) { 170 if (e.get Button() == MouseEvent.BUTTON3) {171 AutoScaleAction.zoomTo( Collections.singletonList(getSelectedPrimitive()));169 if (e.getClickCount()>1 && Main.isDisplayingMapView()) { 170 AutoScaleAction.zoomTo(currentSelection); 172 171 } 173 172 } … … 177 176 @Override 178 177 public void valueChanged(ListSelectionEvent e) { 179 List<OsmPrimitive> prims= getSelectedPrimitives();180 if ( prims!= null && Main.isDisplayingMapView() ) {181 if (highlightHelper.highlightOnly( prims)) {178 currentSelection = getSelectedPrimitives(); 179 if (currentSelection != null && Main.isDisplayingMapView() ) { 180 if (highlightHelper.highlightOnly(currentSelection)) { 182 181 Main.map.mapView.repaint(); 183 182 } … … 211 210 private JPopupMenu createPopupMenu() { 212 211 JPopupMenu menu = new JPopupMenu(); 212 menu.add(new AbstractAction(tr("Zoom to objects"), ImageProvider.get("dialogs/autoscale", "selection")) { 213 @Override 214 public void actionPerformed(ActionEvent e) { 215 if (Main.isDisplayingMapView()) { 216 AutoScaleAction.zoomTo(currentSelection); 217 } 218 } 219 }); 213 220 menu.add(new AbstractAction(tr("Remove tag"), ImageProvider.get("dialogs", "delete")){ 214 221 @Override -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/UtilsUnaryMatchFactory.java
r30202 r30384 24 24 } else if ("allintersecting".equals(keyword)) { 25 25 return new IntersectingMatch(matchOperand, true); 26 } 26 } 27 27 return null; 28 28 }
Note:
See TracChangeset
for help on using the changeset viewer.