Ignore:
Timestamp:
2017-05-12T01:28:59+02:00 (7 years ago)
Author:
Don-vip
Message:

see #14741 - rework initialization of Main.Panel so that it is done after PlatformHook.preStartupHook, as any other Swing code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r11925 r12125  
    8888    private static final List<String> COMMAND_LINE_ARGS = new ArrayList<>();
    8989
    90     private MainFrame mainFrame;
     90    private final MainFrame mainFrame;
    9191
    9292    /**
     
    109109    @Override
    110110    protected void initializeMainWindow() {
    111         mainPanel.reAddListeners();
    112111        if (mainFrame != null) {
     112            mainFrame.preInitialize();
     113            panel = mainFrame.getPanel();
    113114            mainFrame.initialize();
    114 
    115115            menu = mainFrame.getMenu();
    116116        } else {
    117117            // required for running some tests.
     118            panel = new MainPanel(Main.getLayerManager());
    118119            menu = new MainMenu();
    119120        }
     121        panel.addMapFrameListener((o, n) -> redoUndoListener.commandChanged(0, 0));
     122        panel.reAddListeners();
    120123    }
    121124
Note: See TracChangeset for help on using the changeset viewer.