Changeset 4526 in josm


Ignore:
Timestamp:
2011-10-19T07:54:44+02:00 (13 years ago)
Author:
simon04
Message:

see #5781 - unregister keyboard shortcuts of properties dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r4518 r4526  
    188188    private SearchAction searchActionAny = new SearchAction(false);
    189189    private AddAction addAction = new AddAction();
     190    private EditAction editAction = new EditAction();
     191    private DeleteAction deleteAction = new DeleteAction();
    190192
    191193    @Override
     
    202204        SelectionEventManager.getInstance().removeSelectionListener(this);
    203205        MapView.removeEditLayerChangeListener(this);
     206        Main.unregisterActionShortcut(addAction);
     207        Main.unregisterActionShortcut(editAction);
     208        Main.unregisterActionShortcut(deleteAction);
    204209    }
    205210
     
    795800        // -- edit action
    796801        //
    797         EditAction editAction = new EditAction();
    798802        propertyTable.getSelectionModel().addListSelectionListener(editAction);
    799803        membershipTable.getSelectionModel().addListSelectionListener(editAction);
     
    802806        // -- delete action
    803807        //
    804         DeleteAction deleteAction = new DeleteAction();
    805808        this.btnDel = new SideButton(deleteAction);
    806809        membershipTable.getSelectionModel().addListSelectionListener(deleteAction);
     
    10911094        protected void updateEnabledState() {
    10921095            setEnabled(
    1093                     PropertiesDialog.this.propertyTable.getSelectedRowCount() >0
    1094                     || PropertiesDialog.this.membershipTable.getSelectedRowCount() > 0
     1096                    (propertyTable != null && propertyTable.getSelectedRowCount() == 1)
     1097                    ^ (membershipTable != null && membershipTable.getSelectedRowCount() == 1)
    10951098            );
    10961099        }
     
    11391142        protected void updateEnabledState() {
    11401143            setEnabled(
    1141                     propertyTable.getSelectedRowCount() == 1
    1142                     ^ membershipTable.getSelectedRowCount() == 1
     1144                    (propertyTable != null && propertyTable.getSelectedRowCount() == 1)
     1145                    ^ (membershipTable != null && membershipTable.getSelectedRowCount() == 1)
    11431146            );
    11441147        }
Note: See TracChangeset for help on using the changeset viewer.