Ticket #2713: 1_improve_extended_dialog.patch

File 1_improve_extended_dialog.patch, 1.1 KB (added by xeen, 16 years ago)
  • src/org/openstreetmap/josm/gui/ExtendedDialog.java

     
    2929    private final String[] bTexts;
    3030
    3131    // For easy access when inherited
    32     protected Object contentConstraints = GBC.eol().anchor(GBC.CENTER).insets(5,10,5,0);
     32    protected Object contentConstraints = GBC.eol().anchor(GBC.CENTER).fill(GBC.HORIZONTAL).insets(5,10,5,0);
    3333    protected ArrayList<JButton> buttons = new ArrayList<JButton>();
    3434
    3535    /**
     
    174174    private void setupEscListener() {
    175175        Action actionListener = new AbstractAction() {
    176176            public void actionPerformed(ActionEvent actionEvent) {
     177                // 0 means that the dialog has been closed otherwise.
     178                // We need to set it to zero again, in case the dialog has been re-used
     179                // and the result differs from its default value
     180                result = 0;
    177181                setVisible(false);
    178182            }
    179183        };