Changeset 35474 in osm for applications/editors


Ignore:
Timestamp:
2020-05-27T11:48:18+02:00 (4 years ago)
Author:
gerdp
Message:

see #josm19286: Actions should avoid to install listeners which are not needed

Location:
applications/editors/josm/plugins
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/alignways/src/org/openstreetmap/josm/plugins/alignways/AlignWaysAction.java

    r35450 r35474  
    3333                Shortcut.registerShortcut("tools:alignways", tr("Tool: {0}", tr("Align Ways")),
    3434                                KeyEvent.VK_SPACE, Shortcut.SHIFT),
    35                 true);
     35                true, false);
    3636        setEnabled(false);
    3737    }
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/BuildingRectangleAction.java

    r34572 r35474  
    1717                        tr("Data: {0}", tr("Set buildings shape to rectangle")),
    1818                        KeyEvent.VK_R, Shortcut.ALT),
    19                 true);
     19                true, false);
    2020    }
    2121
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/BuildingSizeAction.java

    r35364 r35474  
    1616                Shortcut.registerShortcut("edit:buildingsdialog", tr("Edit: {0}", tr("Set buildings size")),
    1717                KeyEvent.VK_B, Shortcut.ALT_CTRL),
    18                 true, "edit:buildingsdialog", true);
     18                true, "edit:buildingsdialog", false);
    1919    }
    2020
  • applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/MergeAddrPointsAction.java

    r34982 r35474  
    114114            int oldMulti = multi;
    115115            for (Node n : addrNodes) {
    116                 if (Geometry.nodeInsidePolygon(n, w.getNodes()))
     116                if (Geometry.nodeInsidePolygon(n, w.getNodes())) {
    117117                    if (mergeNode != null) {
    118118                        multi++;
     
    120120                        // skipping
    121121                        break;
    122                     } else
     122                    } else {
    123123                        mergeNode = n;
     124                    }
     125                }
    124126            }
    125127            if (oldMulti != multi)
     
    180182
    181183    @Override
     184    protected boolean listenToSelectionChange() {
     185        return false;
     186    }
     187
     188    @Override
    182189    protected void updateEnabledState() {
    183190        setEnabled(getLayerManager().getEditDataSet() != null);
  • applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetAction.java

    r34028 r35474  
    1919        super(tr("Revert changeset"), "revert-changeset", tr("Revert changeset"),
    2020            Shortcut.registerShortcut("tool:revert", tr("Tool: {0}", tr("Revert changeset")), KeyEvent.VK_T, Shortcut.CTRL_SHIFT),
    21                 true);
     21                true, false);
    2222    }
    2323
  • applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java

    r35465 r35474  
    236236     */
    237237    public UndeleteAction() {
    238         super(tr("Undelete object..."), "undelete", tr("Undelete object by id"),
    239                 Shortcut.registerShortcut("tools:undelete", tr("File: {0}", tr("Undelete object...")), KeyEvent.VK_U, Shortcut.ALT_SHIFT), true);
     238                super(tr("Undelete object..."), "undelete", tr("Undelete object by id"),
     239                                Shortcut.registerShortcut("tools:undelete", tr("File: {0}", tr("Undelete object...")), KeyEvent.VK_U,
     240                                                Shortcut.ALT_SHIFT),
     241                                true, false);
    240242    }
    241243
Note: See TracChangeset for help on using the changeset viewer.