Changeset 2490 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-11-21T14:03:11+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
r2489 r2490 570 570 EditAction editAction = new EditAction(); 571 571 propertyTable.getSelectionModel().addListSelectionListener(editAction); 572 membershipTable.getSelectionModel().addListSelectionListener(editAction); 572 573 this.btnEdit = new SideButton(editAction); 573 574 buttonPanel.add(this.btnEdit); … … 901 902 if (!isEnabled()) 902 903 return; 903 int row = propertyTable.getSelectedRow(); 904 propertyEdit(row >= 0 ? row : 0); 904 if (propertyTable.getSelectedRowCount() == 1) { 905 int row = propertyTable.getSelectedRow(); 906 propertyEdit(row); 907 } else if (membershipTable.getSelectedRowCount() == 1) { 908 int row = membershipTable.getSelectedRow(); 909 membershipEdit(row); 910 } 905 911 } 906 912 907 913 protected void updateEnabledState() { 908 setEnabled(propertyTable.getSelectedRowCount() == 1); 914 setEnabled( 915 propertyTable.getSelectedRowCount() == 1 916 ^ membershipTable.getSelectedRowCount() == 1 917 ); 909 918 } 910 919 -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r2488 r2490 620 620 } 621 621 622 public int getIndexOfRelation(Relation relation) {623 if (relation == null) return -1;624 return relations.indexOf(relation);625 }626 627 622 /** 628 623 * Replies the list of selected, non-new relations. Empty list,
Note:
See TracChangeset
for help on using the changeset viewer.