Ticket #23392: 23392.patch

File 23392.patch, 1.0 KB (added by GerdP, 8 months ago)

possible fix for the ill-sized Nag panel

  • src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java

     
    1111import javax.swing.JButton;
    1212import javax.swing.JCheckBox;
    1313import javax.swing.JPanel;
     14import javax.swing.SwingUtilities;
    1415import javax.swing.border.CompoundBorder;
    1516import javax.swing.border.EmptyBorder;
    1617import javax.swing.border.EtchedBorder;
     
    9293        if (MainApplication.isDisplayingMapView() && showAgain.get() && !infoToAdd.isGeoreferenceValid()
    9394                && map.getTopPanel(AlignImageryPanel.class) == null) {
    9495            double w = GuiHelper.getScreenSize().getWidth();
    95             map.addTopPanel(new AlignImageryPanel(w > 1300, showAgain, infoToAdd));
     96            SwingUtilities.invokeLater(() -> map.addTopPanel(new AlignImageryPanel(w > 1300, showAgain, infoToAdd)));
    9697        }
    9798    }
    9899}