diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java b/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
index c962255..b95a6b3 100644
|
a
|
b
|
public class PropertiesDialog extends ToggleDialog implements SelectionChangedLi
|
| 187 | 187 | private SearchAction searchActionSame = new SearchAction(true); |
| 188 | 188 | private SearchAction searchActionAny = new SearchAction(false); |
| 189 | 189 | private AddAction addAction = new AddAction(); |
| | 190 | private EditAction editAction = new EditAction(); |
| | 191 | private DeleteAction deleteAction = new DeleteAction(); |
| 190 | 192 | |
| 191 | 193 | @Override |
| 192 | 194 | public void showNotify() { |
| … |
… |
public class PropertiesDialog extends ToggleDialog implements SelectionChangedLi
|
| 201 | 203 | DatasetEventManager.getInstance().removeDatasetListener(dataChangedAdapter); |
| 202 | 204 | SelectionEventManager.getInstance().removeSelectionListener(this); |
| 203 | 205 | MapView.removeEditLayerChangeListener(this); |
| | 206 | Main.unregisterActionShortcut(addAction); |
| | 207 | Main.unregisterActionShortcut(editAction); |
| | 208 | Main.unregisterActionShortcut(deleteAction); |
| 204 | 209 | } |
| 205 | 210 | |
| 206 | 211 | /** |
| … |
… |
public class PropertiesDialog extends ToggleDialog implements SelectionChangedLi
|
| 794 | 799 | |
| 795 | 800 | // -- edit action |
| 796 | 801 | // |
| 797 | | EditAction editAction = new EditAction(); |
| 798 | 802 | propertyTable.getSelectionModel().addListSelectionListener(editAction); |
| 799 | 803 | membershipTable.getSelectionModel().addListSelectionListener(editAction); |
| 800 | 804 | this.btnEdit = new SideButton(editAction); |
| 801 | 805 | |
| 802 | 806 | // -- delete action |
| 803 | 807 | // |
| 804 | | DeleteAction deleteAction = new DeleteAction(); |
| 805 | 808 | this.btnDel = new SideButton(deleteAction); |
| 806 | 809 | membershipTable.getSelectionModel().addListSelectionListener(deleteAction); |
| 807 | 810 | propertyTable.getSelectionModel().addListSelectionListener(deleteAction); |
| … |
… |
public class PropertiesDialog extends ToggleDialog implements SelectionChangedLi
|
| 1090 | 1093 | @Override |
| 1091 | 1094 | protected void updateEnabledState() { |
| 1092 | 1095 | 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) |
| 1095 | 1098 | ); |
| 1096 | 1099 | } |
| 1097 | 1100 | |
| … |
… |
public class PropertiesDialog extends ToggleDialog implements SelectionChangedLi
|
| 1138 | 1141 | @Override |
| 1139 | 1142 | protected void updateEnabledState() { |
| 1140 | 1143 | setEnabled( |
| 1141 | | propertyTable.getSelectedRowCount() == 1 |
| 1142 | | ^ membershipTable.getSelectedRowCount() == 1 |
| | 1144 | (propertyTable != null && propertyTable.getSelectedRowCount() == 1) |
| | 1145 | ^ (membershipTable != null && membershipTable.getSelectedRowCount() == 1) |
| 1143 | 1146 | ); |
| 1144 | 1147 | } |
| 1145 | 1148 | |