Ticket #18523: 18523.1.patch
File 18523.1.patch, 2.6 KB (added by , 4 years ago) |
---|
-
src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.BorderLayout;7 6 import java.awt.GridBagLayout; 8 7 import java.awt.event.ActionEvent; 9 8 import java.awt.event.ActionListener; … … 62 61 /** the history combo box for the upload comment */ 63 62 private final HistoryComboBox hcbUploadComment = new HistoryComboBox(); 64 63 private final HistoryComboBox hcbUploadSource = new HistoryComboBox(); 64 private final transient JCheckBox obtainSourceAutomatically = new JCheckBox( 65 tr("Automatically obtain source from current layers")); 65 66 /** the panel with a summary of the upload parameters */ 66 67 private final UploadParameterSummaryPanel pnlUploadParameterSummary = new UploadParameterSummaryPanel(); 67 68 /** the checkbox to request feedback from other users */ … … 93 94 automaticallyAddSource(); 94 95 } 95 96 }); 96 JCheckBox obtainSourceAutomatically = new JCheckBox(tr("Automatically obtain source from current layers"));97 97 obtainSourceAutomatically.setSelected(Config.getPref().getBoolean("upload.source.obtainautomatically", false)); 98 98 obtainSourceAutomatically.addActionListener(e -> { 99 99 if (obtainSourceAutomatically.isSelected()) … … 176 176 } 177 177 178 178 protected void build() { 179 setLayout(new BorderLayout());179 setLayout(new GridBagLayout()); 180 180 setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); 181 add(buildUploadCommentPanel(), BorderLayout.NORTH);182 add(pnlUploadParameterSummary, BorderLayout.CENTER);183 add(cbRequestReview, BorderLayout.SOUTH);181 add(buildUploadCommentPanel(), GBC.eol().fill(GBC.BOTH)); 182 add(pnlUploadParameterSummary, GBC.eol().fill(GBC.HORIZONTAL)); 183 add(cbRequestReview, GBC.eol().fill(GBC.HORIZONTAL)); 184 184 cbRequestReview.addItemListener(e -> changesetReviewModel.setReviewRequested(e.getStateChange() == ItemEvent.SELECTED)); 185 185 } 186 186 … … 227 227 // store the history of sources 228 228 hcbUploadSource.addCurrentItemToHistory(); 229 229 Config.getPref().putList(SOURCE_HISTORY_KEY, hcbUploadSource.getHistory()); 230 231 // store current value of obtaining source automatically 232 Config.getPref().putBoolean("upload.source.obtainautomatically", obtainSourceAutomatically.isSelected()); 230 233 } 231 234 232 235 /**