Changeset 6807 in josm for trunk/src


Ignore:
Timestamp:
2014-02-03T23:41:14+01:00 (10 years ago)
Author:
simon04
Message:

see #9673 - Select newly created multipolygon in relation list (fixes regression)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r6792 r6807  
    9999                public void run() {
    100100                    Main.main.undoRedo.add(command);
    101                 }
    102             });
    103 
    104             // Use 'SwingUtilities.invokeLater' to make sure the relationListDialog
    105             // knows about the new relation before we try to select it.
    106             // (Yes, we are already in event dispatch thread. But DatasetEventManager
    107             // uses 'SwingUtilities.invokeLater' to fire events so we have to do
    108             // the same.)
    109             SwingUtilities.invokeLater(new Runnable() {
    110                 @Override
    111                 public void run() {
    112                     Main.map.relationListDialog.selectRelation(relation);
    113                     if (Main.pref.getBoolean("multipoly.show-relation-editor", false)) {
    114                         //Open relation edit window, if set up in preferences
    115                         RelationEditor editor = RelationEditor.getEditor(Main.main.getEditLayer(), relation, null);
    116 
    117                         editor.setModal(true);
    118                         editor.setVisible(true);
    119                     }
     101
     102                    // Use 'SwingUtilities.invokeLater' to make sure the relationListDialog
     103                    // knows about the new relation before we try to select it.
     104                    // (Yes, we are already in event dispatch thread. But DatasetEventManager
     105                    // uses 'SwingUtilities.invokeLater' to fire events so we have to do
     106                    // the same.)
     107                    SwingUtilities.invokeLater(new Runnable() {
     108                        @Override
     109                        public void run() {
     110                            Main.map.relationListDialog.selectRelation(relation);
     111                            if (Main.pref.getBoolean("multipoly.show-relation-editor", false)) {
     112                                //Open relation edit window, if set up in preferences
     113                                RelationEditor editor = RelationEditor.getEditor(Main.main.getEditLayer(), relation, null);
     114
     115                                editor.setModal(true);
     116                                editor.setVisible(true);
     117                            }
     118                        }
     119                    });
    120120                }
    121121            });
Note: See TracChangeset for help on using the changeset viewer.