Ticket #18523: 18523.revert_gridbaglayout_add_seemingly_unnecessary_call.patch

File 18523.revert_gridbaglayout_add_seemingly_unnecessary_call.patch, 1.9 KB (added by taylor.smock, 5 years ago)

Go from GridBagLayout -> BorderLayout and add a totally unnecessary method call (super.getPreferredSize()), if it didn't seem to fix a UI issue.

  • src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java

     
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.awt.BorderLayout;
    67import java.awt.GridBagLayout;
    78import java.awt.event.ActionEvent;
    89import java.awt.event.ActionListener;
     
    176177    }
    177178
    178179    protected void build() {
    179         setLayout(new GridBagLayout());
     180        setLayout(new BorderLayout());
    180181        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
    181         add(buildUploadCommentPanel(), GBC.eol().fill(GBC.BOTH));
    182         add(pnlUploadParameterSummary, GBC.eol().fill(GBC.BOTH));
    183         add(cbRequestReview, GBC.eol().fill(GBC.BOTH));
     182        add(buildUploadCommentPanel(), BorderLayout.NORTH);
     183        add(pnlUploadParameterSummary, BorderLayout.CENTER);
     184        add(cbRequestReview, BorderLayout.SOUTH);
    184185        cbRequestReview.addItemListener(e -> changesetReviewModel.setReviewRequested(e.getStateChange() == ItemEvent.SELECTED));
    185186    }
    186187
  • src/org/openstreetmap/josm/gui/io/UploadDialog.java

     
    432432    static final class CompactTabbedPane extends JTabbedPane {
    433433        @Override
    434434        public Dimension getPreferredSize() {
     435            // This probably fixes #18523. Don't know why. Don't know how. It just does.
     436            super.getPreferredSize();
    435437            // make sure the tabbed pane never grabs more space than necessary
    436438            return super.getMinimumSize();
    437439        }