Ignore:
Timestamp:
2018-10-14T17:30:28+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16841 - MergeLayerActionTest, DownloadWmsAlongTrackActionTest: fix for non-headless mode by properly mocking dialogs (patch by ris)

File:
1 edited

Legend:

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

    r14273 r14332  
    110110        pnl.add(new JLabel(label), GBC.eol());
    111111        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
    116113        ExtendedDialog ed = new ExtendedDialog(MainApplication.getMainFrame(), title, buttonText, tr("Cancel"));
    117114        ed.setButtonIcons(buttonIcon, "cancel");
     
    131128        String message = tr("<html>There are no layers the source layer<br>''{0}''<br>could be merged to.</html>",
    132129                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);
    136131    }
    137132}
Note: See TracChangeset for help on using the changeset viewer.