Ignore:
Timestamp:
2017-08-03T21:43:11+02:00 (7 years ago)
Author:
Don-vip
Message:

fix unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java

    r12559 r12563  
    151151
    152152        initContentPane();
    153         initMainPanel();
     153        initMainPanel(false);
    154154        initToolbar();
    155155        if (Main.main == null) {
     
    157157        } else {
    158158            if (Main.main.panel == null) {
    159                 initMainPanel();
     159                initMainPanel(false);
    160160                Main.main.panel = Main.mainPanel;
    161161            }
     
    177177    /**
    178178     * Make sure {@code Main.mainPanel} is initialized.
     179     * @param reAddListeners {@code true} to re-add listeners
    179180     */
    180     public static void initMainPanel() {
     181    public static void initMainPanel(boolean reAddListeners) {
    181182        if (Main.mainPanel == null) {
    182183            Main.mainPanel = new MainPanel(Main.getLayerManager());
     184        }
     185        if (reAddListeners) {
     186            Main.mainPanel.reAddListeners();
    183187        }
    184188    }
Note: See TracChangeset for help on using the changeset viewer.