Changeset 4102 in josm for trunk/src/org


Ignore:
Timestamp:
2011-05-29T21:30:16+02:00 (13 years ago)
Author:
bastiK
Message:

fixed #4662 (patch by Hojoe) - dialog box going out of bound when tag is too long

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r4072 r4102  
    88import java.awt.Component;
    99import java.awt.Dialog.ModalityType;
     10import java.awt.Dimension;
    1011import java.awt.Font;
    1112import java.awt.GridBagLayout;
     
    266267        final JDialog dlg = optionPane.createDialog(Main.parent, tr("Change values?"));
    267268        dlg.setModalityType(ModalityType.DOCUMENT_MODAL);
    268 
     269        Dimension dlgSize = dlg.getSize();
     270        if(dlgSize.width > Main.parent.getSize().width) {
     271            dlgSize.width = Math.max(250, Main.parent.getSize().width);
     272            dlg.setSize(dlgSize);
     273        }
     274        dlg.setLocationRelativeTo(Main.parent);
    269275        values.getEditor().addActionListener(new ActionListener() {
    270276            public void actionPerformed(ActionEvent e) {
Note: See TracChangeset for help on using the changeset viewer.