Changeset 2490 in josm


Ignore:
Timestamp:
2009-11-21T14:03:11+01:00 (12 years ago)
Author:
Gubaer
Message:

fixed #3994: unerwarteter Fehler (im Zusammenhang mit Relation)
fixed #3990: "Bearbeiten" button without function (fixed issues related to relation memberships)

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  
    570570        EditAction editAction = new EditAction();
    571571        propertyTable.getSelectionModel().addListSelectionListener(editAction);
     572        membershipTable.getSelectionModel().addListSelectionListener(editAction);
    572573        this.btnEdit = new SideButton(editAction);
    573574        buttonPanel.add(this.btnEdit);
     
    901902            if (!isEnabled())
    902903                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            }
    905911        }
    906912
    907913        protected void updateEnabledState() {
    908             setEnabled(propertyTable.getSelectedRowCount() == 1);
     914            setEnabled(
     915                    propertyTable.getSelectedRowCount() == 1
     916                    ^ membershipTable.getSelectedRowCount() == 1
     917            );
    909918        }
    910919
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r2488 r2490  
    620620        }
    621621
    622         public int getIndexOfRelation(Relation relation) {
    623             if (relation == null) return -1;
    624             return relations.indexOf(relation);
    625         }
    626 
    627622        /**
    628623         * Replies the list of selected, non-new relations. Empty list,
Note: See TracChangeset for help on using the changeset viewer.