Ignore:
Timestamp:
2014-04-08T20:32:56+02:00 (11 years ago)
Author:
akks
Message:

[josm_utilsplugin2]: usedinways/usedinrealtions; multitagger: center on double-click

Location:
applications/editors/josm/plugins/utilsplugin2
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/build.xml

    r30370 r30384  
    33
    44    <!-- 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"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    77    <property name="plugin.main.version" value="6317"/>
  • applications/editors/josm/plugins/utilsplugin2/nbproject/project.xml

    r28222 r30384  
    6565            <compilation-unit>
    6666                <package-root>src</package-root>
    67                 <classpath mode="compile">../../core/src</classpath>
     67                <classpath mode="compile">../../core/src;../../core/dist/josm-custom.jar</classpath>
    6868                <source-level>1.6</source-level>
    6969            </compilation-unit>
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/UtilsPlugin2.java

    r30343 r30384  
    2929import org.openstreetmap.josm.plugins.utilsplugin2.multitagger.MultiTagAction;
    3030import org.openstreetmap.josm.plugins.utilsplugin2.replacegeometry.ReplaceGeometryAction;
     31import org.openstreetmap.josm.plugins.utilsplugin2.search.UtilsSimpleMatchFactory;
    3132import org.openstreetmap.josm.plugins.utilsplugin2.search.UtilsUnaryMatchFactory;
    3233import org.openstreetmap.josm.plugins.utilsplugin2.selection.AdjacentNodesAction;
     
    124125        // register search operators
    125126        SearchCompiler.addMatchFactory(new UtilsUnaryMatchFactory());
     127        SearchCompiler.addMatchFactory(new UtilsSimpleMatchFactory());
    126128    }
    127129
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/multitagger/MultiTagDialog.java

    r30370 r30384  
    6767    private final HighlightHelper highlightHelper = new HighlightHelper();
    6868    private final HistoryComboBox cbTagSet = new HistoryComboBox();
     69    private List<OsmPrimitive> currentSelection;
    6970   
    7071    private static final String HISTORY_KEY = "utilsplugin2.multitaghistory";
     
    7273        "highway, name, ${id}, ${length}",
    7374        "name name:en name:ru name:de"};
    74     TagCellEditor cellEditor;
    75    
    7675   
    7776    public MultiTagDialog() {
     
    168167        @Override
    169168        public void mouseClicked(MouseEvent e) {
    170             if (e.getButton() == MouseEvent.BUTTON3) {
    171                 AutoScaleAction.zoomTo(Collections.singletonList(getSelectedPrimitive()));
     169            if (e.getClickCount()>1 && Main.isDisplayingMapView()) {
     170                AutoScaleAction.zoomTo(currentSelection);
    172171            }
    173172        }
     
    177176        @Override
    178177        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)) {
    182181                    Main.map.mapView.repaint();
    183182                }
     
    211210    private JPopupMenu createPopupMenu() {
    212211        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        });
    213220        menu.add(new AbstractAction(tr("Remove tag"), ImageProvider.get("dialogs", "delete")){
    214221            @Override
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/search/UtilsUnaryMatchFactory.java

    r30202 r30384  
    2424        } else if ("allintersecting".equals(keyword)) {
    2525            return new IntersectingMatch(matchOperand, true);
    26         }
     26        } 
    2727        return null;
    2828    }
Note: See TracChangeset for help on using the changeset viewer.