Changeset 1902 in josm for trunk/src/org


Ignore:
Timestamp:
2009-08-04T07:56:11+02:00 (15 years ago)
Author:
Gubaer
Message:

temporary fix for #3181: Dialogs causes JOSM window to be set as "always on top", preventing switchiong to other windows.

File:
1 edited

Legend:

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

    r1865 r1902  
    2121import javax.swing.KeyStroke;
    2222
     23import org.openstreetmap.josm.Main;
    2324import org.openstreetmap.josm.tools.GBC;
    2425import org.openstreetmap.josm.tools.ImageProvider;
     
    139140        setLocationRelativeTo(parent);
    140141
    141         // try to put always on top
     142        // temporary fix for "#3181 : Dialogs causes JOSM window to be set as "always on top", preventing switchiong to
     143        // other windows."
     144        // See also {@see OptionPaneUtil}
    142145        //
    143         try {
    144             setAlwaysOnTop(true);
    145         } catch(SecurityException e) {
    146             System.out.println(tr("Warning: failed to bring extended dialog always on top. Exception: {0}", e.toString()));
     146        if (Main.pref.getBoolean("window-handling.option-pane-always-on-top", true)) {
     147            // try to put always on top
     148            //
     149            try {
     150                setAlwaysOnTop(true);
     151            } catch(SecurityException e) {
     152                System.out.println(tr("Warning: failed to bring extended dialog always on top. Exception: {0}", e.toString()));
     153            }
    147154        }
    148155    }
Note: See TracChangeset for help on using the changeset viewer.