Ignore:
Timestamp:
2020-10-25T17:07:27+01:00 (6 years ago)
Author:
GerdP
Message:

see #7548: Re-organize the preference dialog
Apply 7548-no-empty.patch to avoid empty top panel

  • make sure that a panel is selected when selectPreviouslySelectedPreferences() is called and nothing was previously selected
  • reverts r17097
File:
1 edited

Legend:

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

    r17188 r17265  
    77import java.awt.event.ActionEvent;
    88import java.awt.event.KeyEvent;
    9 
    10 import javax.swing.SwingUtilities;
    119
    1210import org.openstreetmap.josm.gui.MainApplication;
     
    108106    public void run() {
    109107        final PreferenceDialog p = new PreferenceDialog(MainApplication.getMainFrame());
    110         SwingUtilities.invokeLater(() -> {
    111             if (tab != null) {
    112                 p.selectPreferencesTabByClass(tab);
    113             } else if (subTab != null) {
    114                 p.selectSubPreferencesTabByClass(subTab);
    115             } else {
    116                 p.selectPreviouslySelectedPreferences();
    117             }
    118         });
     108        if (tab != null) {
     109            p.selectPreferencesTabByClass(tab);
     110        } else if (subTab != null) {
     111            p.selectSubPreferencesTabByClass(subTab);
     112        } else {
     113            p.selectPreviouslySelectedPreferences();
     114        }
    119115        p.setVisible(true);
    120116    }
Note: See TracChangeset for help on using the changeset viewer.