- Timestamp:
- 2014-02-04T00:21:44+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r6700 r6808 414 414 @Override 415 415 public void setupDialog() { 416 setResizable(false);417 416 super.setupDialog(); 417 final Dimension size = getSize(); 418 // Set resizable only in width 419 setMinimumSize(size); 420 setPreferredSize(size); 421 // setMaximumSize does not work, and never worked, but still it seems not to bother Oracle to fix this 10-year-old bug 422 // https://bugs.openjdk.java.net/browse/JDK-6200438 423 // https://bugs.openjdk.java.net/browse/JDK-6464548 418 424 419 425 setRememberWindowGeometry(getClass().getName() + ".geometry", 420 WindowGeometry.centerInWindow(Main.parent, getSize()));426 WindowGeometry.centerInWindow(Main.parent, size)); 421 427 } 422 428 423 429 @Override 424 430 public void setVisible(boolean visible) { 425 // Do not want dialog to be resizable , butits size may increase each time because of the recently added tags431 // Do not want dialog to be resizable in height, as its size may increase each time because of the recently added tags 426 432 // So need to modify the stored geometry (size part only) in order to use the automatic positioning mechanism 427 433 if (visible) { 428 434 WindowGeometry geometry = initWindowGeometry(); 429 435 Dimension storedSize = geometry.getSize(); 430 if (!storedSize.equals(getSize())) { 431 storedSize.setSize(getSize()); 436 Dimension size = getSize(); 437 if (!storedSize.equals(size)) { 438 if (storedSize.width < size.width) { 439 storedSize.width = size.width; 440 } 441 if (storedSize.height != size.height) { 442 storedSize.height = size.height; 443 } 432 444 rememberWindowGeometry(geometry); 433 445 } … … 617 629 } 618 630 JOptionPane.showMessageDialog(this, tr("Please enter integer number between 0 and {0}", MAX_LRU_TAGS_NUMBER)); 619 620 631 } 621 632 … … 757 768 } 758 769 } 759 760 770 } 761 771 }
Note:
See TracChangeset
for help on using the changeset viewer.