- Timestamp:
- 2019-02-06T11:07:19+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
r14426 r14766 38 38 public boolean initialized; 39 39 40 private final JSplitPane parent;40 private final JSplitPane myParent; 41 41 42 42 /** … … 45 45 */ 46 46 public DialogsPanel(JSplitPane parent) { 47 this. parent = parent;47 this.myParent = parent; 48 48 } 49 49 … … 192 192 * Determine the panel geometry 193 193 */ 194 if (action == Action.RESTORE_SAVED ) {194 if (action == Action.RESTORE_SAVED || action == Action.ELEMENT_SHRINKS) { 195 195 for (int i = 0; i < n; ++i) { 196 196 final ToggleDialog dlg = allDialogs.get(i); 197 197 if (dlg.isDialogInDefaultView()) { 198 final int ph = dlg.getLastHeight(); 199 final int ah = dlg.getSize().height; 200 dlg.setPreferredSize(new Dimension(Integer.MAX_VALUE, ah < 20 ? ph : ah)); 201 } 202 } 203 204 } else if (action == Action.ELEMENT_SHRINKS) { 205 for (int i = 0; i < n; ++i) { 206 final ToggleDialog dlg = allDialogs.get(i); 207 if (dlg.isDialogInDefaultView()) { 208 final int ph = dlg.getPreferredHeight(); 198 final int ph = action == Action.RESTORE_SAVED ? dlg.getLastHeight() : dlg.getPreferredHeight(); 209 199 final int ah = dlg.getSize().height; 210 200 dlg.setPreferredSize(new Dimension(Integer.MAX_VALUE, ah < 20 ? ph : ah)); … … 324 314 */ 325 315 if (numPanels == 1 && panels.get(n-1).getComponents().length == 0) { 326 parent.setDividerSize(0);316 myParent.setDividerSize(0); 327 317 this.setVisible(false); 328 318 } else { … … 331 321 } 332 322 this.setVisible(true); 333 parent.setDividerSize(5);334 parent.resetToPreferredSizes();323 myParent.setDividerSize(5); 324 myParent.resetToPreferredSizes(); 335 325 } 336 326 }
Note:
See TracChangeset
for help on using the changeset viewer.