Changeset 4754 in josm


Ignore:
Timestamp:
Dec 30, 2011 11:10:09 PM (17 months ago)
Author:
jttt
Message:

Fix #7207 download/upload dialogs steal focus, probably others too

File:
1 edited

Legend:

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

    r4739 r4754  
    4848    private boolean cancelable; 
    4949 
     50    private void setDialogVisible(boolean visible) { 
     51        if (dialog.isVisible() != visible) { 
     52            dialog.setVisible(visible); 
     53        } 
     54    } 
     55 
    5056    private ProgressMonitorDialog getDialog() { 
    5157 
     
    6066        } 
    6167        if (dialog != null) { 
    62             dialog.setVisible(!isInBackground || backgroundMonitor == null); 
     68            setDialogVisible(!isInBackground || backgroundMonitor == null); 
    6369        } 
    6470 
     
    6672            backgroundMonitor.setVisible(true); 
    6773            if (dialog != null) { 
    68                 dialog.setVisible(false); 
     74                setDialogVisible(false); 
    6975            } 
    7076            return backgroundMonitor; 
     
    7278            backgroundMonitor.setVisible(false); 
    7379            if (dialog != null) { 
    74                 dialog.setVisible(true); 
     80                setDialogVisible(true); 
    7581            } 
    7682            return dialog; 
    7783        } else if (dialog != null) { 
    78             dialog.setVisible(true); 
     84            setDialogVisible(true); 
    7985            return dialog; 
    8086        } else 
Note: See TracChangeset for help on using the changeset viewer.