- Timestamp:
- 2009-01-24T22:23:50+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java
r1306 r1331 278 278 } 279 279 }); 280 ListSelectionModel lsm2 = propertyTable.getSelectionModel();281 lsm2.addListSelectionListener(new ListSelectionListener() {282 public void valueChanged(ListSelectionEvent e) {283 Main.ds.setSelected(RelationEditor.this.relation);284 }285 });286 280 propertyTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); 287 281 -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r1305 r1331 64 64 displaylist.addMouseListener(new MouseAdapter(){ 65 65 @Override public void mouseClicked(MouseEvent e) { 66 if (e.getClickCount() < 2) 67 return; 68 Relation toEdit = (Relation) displaylist.getSelectedValue(); 69 if (toEdit != null) 70 new RelationEditor(toEdit).setVisible(true); 66 if (e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) 67 Main.ds.setSelected((Relation)displaylist.getSelectedValue()); 71 68 } 72 69 }); 73 /*displaylist.addListSelectionListener(new ListSelectionListener(){74 public void valueChanged(ListSelectionEvent e) {75 Relation toEdit = (Relation) displaylist.getSelectedValue();76 if (toEdit != null) {77 Main.ds.setSelected(toEdit);78 AutoScaleAction asa = new AutoScaleAction("selection");79 asa.actionPerformed(null);80 }81 }82 });*/83 70 84 71 add(new JScrollPane(displaylist), BorderLayout.CENTER); … … 90 77 // call relation editor with null argument to create new relation 91 78 new RelationEditor(null).setVisible(true); 92 }93 }), GBC.std());94 95 buttonPanel.add(new SideButton(marktr("Select"), "select", "Selection", tr("Select this relation"), new ActionListener() {96 public void actionPerformed(ActionEvent e) {97 // replace selection with the relation from the list98 Main.ds.setSelected((Relation)displaylist.getSelectedValue());99 AutoScaleAction asa = new AutoScaleAction("selection");100 asa.actionPerformed(null);101 79 } 102 80 }), GBC.std());
Note:
See TracChangeset
for help on using the changeset viewer.