Changeset 14332 in josm for trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
- Timestamp:
- 2018-10-14T17:30:28+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
r14273 r14332 110 110 pnl.add(new JLabel(label), GBC.eol()); 111 111 pnl.add(layerList, GBC.eol().fill(GBC.HORIZONTAL)); 112 if (GraphicsEnvironment.isHeadless()) { 113 // return first layer in headless mode, for unit tests 114 return targetLayers[0]; 115 } 112 116 113 ExtendedDialog ed = new ExtendedDialog(MainApplication.getMainFrame(), title, buttonText, tr("Cancel")); 117 114 ed.setButtonIcons(buttonIcon, "cancel"); … … 131 128 String message = tr("<html>There are no layers the source layer<br>''{0}''<br>could be merged to.</html>", 132 129 Utils.escapeReservedCharactersHTML(sourceLayer.getName())); 133 if (!GraphicsEnvironment.isHeadless()) { 134 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), message, tr("No target layers"), JOptionPane.WARNING_MESSAGE); 135 } 130 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), message, tr("No target layers"), JOptionPane.WARNING_MESSAGE); 136 131 } 137 132 }
Note:
See TracChangeset
for help on using the changeset viewer.