Changeset 10384 in josm


Ignore:
Timestamp:
2016-06-15T14:58:34+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #12954 - IllegalComponentStateException with detached dialogs

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

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

    r9795 r10384  
    1212import org.openstreetmap.josm.actions.ExpertToggleAction;
    1313import org.openstreetmap.josm.actions.ExpertToggleAction.ExpertModeChangeListener;
     14import org.openstreetmap.josm.tools.CheckParameterUtil;
    1415import org.openstreetmap.josm.tools.Destroyable;
    1516
     
    4142    public IconToggleButton(Action action, boolean isExpert) {
    4243        super(action);
     44        CheckParameterUtil.ensureParameterNotNull(action, "action");
    4345        this.isExpert = isExpert;
    4446        setText(null);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r10378 r10384  
    716716
    717717        protected void rememberGeometry() {
    718             if (detachedDialog != null) {
     718            if (detachedDialog != null && detachedDialog.isShowing()) {
    719719                new WindowGeometry(detachedDialog).remember(preferencePrefix+".geometry");
    720720            }
  • trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java

    r10378 r10384  
    99import java.awt.GraphicsDevice;
    1010import java.awt.GraphicsEnvironment;
     11import java.awt.IllegalComponentStateException;
    1112import java.awt.Insets;
    1213import java.awt.Point;
     
    5758     *
    5859     * @param window the window
     60     * @throws IllegalComponentStateException if the window is not showing on the screen
    5961     */
    6062    public WindowGeometry(Window window) {
Note: See TracChangeset for help on using the changeset viewer.