- Timestamp:
- 2014-01-16T23:31:29+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
r6084 r6706 19 19 import org.openstreetmap.josm.tools.Shortcut; 20 20 21 /** 22 * Action that merges two or more OSM data layers. 23 * @since 1890 24 */ 21 25 public class MergeLayerAction extends AbstractMergeAction { 22 26 27 /** 28 * Constructs a new {@code MergeLayerAction}. 29 */ 23 30 public MergeLayerAction() { 24 31 super(tr("Merge layer"), "dialogs/mergedown", … … 58 65 } 59 66 67 /** 68 * Merges a list of layers together. 69 * @param sourceLayers The layers to merge 70 */ 60 71 public void merge(List<Layer> sourceLayers) { 61 72 doMerge(sourceLayers, sourceLayers); 62 73 } 63 74 75 /** 76 * Merges the given source layer with another one, determined at runtime. 77 * @param sourceLayer The source layer to merge 78 */ 64 79 public void merge(Layer sourceLayer) { 65 80 if (sourceLayer == null) … … 96 111 97 112 /** 98 * returns true if the user wants to cancel, false if they want to continue 113 * Warns about a discouraged merge operation, ask for confirmation. 114 * @param sourceLayer The source layer 115 * @param targetLayer The target layer 116 * @return {@code true} if the user wants to cancel, {@code false} if they want to continue 99 117 */ 100 118 public static final boolean warnMergingUploadDiscouragedLayers(Layer sourceLayer, Layer targetLayer) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r6362 r6706 763 763 public void actionPerformed(ActionEvent e) { 764 764 if (layer != null) { 765 new MergeLayerAction().merge(layer);765 Main.main.menu.merge.merge(layer); 766 766 } else { 767 767 if (getModel().getSelectedLayers().size() == 1) { 768 768 Layer selectedLayer = getModel().getSelectedLayers().get(0); 769 new MergeLayerAction().merge(selectedLayer);769 Main.main.menu.merge.merge(selectedLayer); 770 770 } else { 771 new MergeLayerAction().merge(getModel().getSelectedLayers());771 Main.main.menu.merge.merge(getModel().getSelectedLayers()); 772 772 } 773 773 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
r6636 r6706 30 30 import org.openstreetmap.josm.data.validation.util.MultipleNameVisitor; 31 31 import org.openstreetmap.josm.gui.preferences.validator.ValidatorPreference; 32 import org.openstreetmap.josm.gui.util.GuiHelper; 32 33 import org.openstreetmap.josm.tools.Destroyable; 33 34 import org.openstreetmap.josm.tools.MultiMap; … … 127 128 public void buildTree() { 128 129 updateCount++; 129 DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode();130 final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(); 130 131 131 132 if (errors == null || errors.isEmpty()) { 132 valTreeModel.setRoot(rootNode); 133 GuiHelper.runInEDTAndWait(new Runnable() { 134 @Override 135 public void run() { 136 valTreeModel.setRoot(rootNode); 137 } 138 }); 133 139 return; 134 140 }
Note:
See TracChangeset
for help on using the changeset viewer.