- Timestamp:
- 2018-05-16T21:30:47+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryDialog.java
r13774 r13777 18 18 public class AddImageryDialog extends ExtendedDialog implements ContentValidationListener { 19 19 20 private final String saveGeometryEntryName;21 22 20 /** 23 21 * Constructs a new AddImageryDialog. … … 33 31 setMinimumSize(new Dimension(300, 400)); 34 32 panel.addContentValidationListener(this); 35 this.saveGeometryEntryName = panel.getClass().getName() + ".geometry"; 33 setRememberWindowGeometry( 34 panel.getClass().getName() + ".geometry", 35 WindowGeometry.centerInWindow(Main.parent, new Dimension(400, 600)) 36 ); 36 37 } 37 38 … … 46 47 buttons.get(0).setEnabled(isValid); 47 48 } 48 49 @Override50 public void setVisible(boolean visible) {51 if (visible) {52 new WindowGeometry(saveGeometryEntryName, WindowGeometry.centerInWindow(Main.parent,53 new Dimension(800, 600))).applySafe(this);54 } else if (isShowing()) { // Avoid IllegalComponentStateException like in #877555 new WindowGeometry(this).remember(saveGeometryEntryName);56 }57 super.setVisible(visible);58 }59 49 }
Note:
See TracChangeset
for help on using the changeset viewer.