Changeset 1331 in josm


Ignore:
Timestamp:
2009-01-24T22:23:50+01:00 (11 years ago)
Author:
stoecker
Message:

close #2058, #2063

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  
    278278            }
    279279        });
    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         });
    286280        propertyTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    287281
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r1305 r1331  
    6464        displaylist.addMouseListener(new MouseAdapter(){
    6565            @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());
    7168            }
    7269        });
    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         });*/
    8370
    8471        add(new JScrollPane(displaylist), BorderLayout.CENTER);
     
    9077                // call relation editor with null argument to create new relation
    9178                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 list
    98                 Main.ds.setSelected((Relation)displaylist.getSelectedValue());
    99                 AutoScaleAction asa = new AutoScaleAction("selection");
    100                 asa.actionPerformed(null);
    10179            }
    10280        }), GBC.std());
Note: See TracChangeset for help on using the changeset viewer.