Ticket #19876: 19876.patch

File 19876.patch, 1.4 KB (added by GerdP, 5 years ago)
  • src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java

     
    229229    public void dispose() {
    230230        previouslySelected = tpPreferences.getSelectedTab();
    231231        removeWindowListener(windowEventHandler);
     232        setVisible(false); // save current geometry
    232233        super.dispose();
    233234    }
    234235}
  • src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java

     
    642642                    Icon icon = getIconAt(index);
    643643                    remove(index);
    644644                    if (index <= insertGUITabsForSetting(icon, preferenceSettings, index)) {
     645                        if (index > 0) {
     646                            // see #19876: avoid situation when icon in left pane doesn't match the preference setting
     647                            setSelectedIndex(0);
     648                        }
    645649                        setSelectedIndex(index);
    646650                    }
    647651                } catch (SecurityException ex) {