Ticket #18523: 18523.patch
File 18523.patch, 2.6 KB (added by , 5 years ago) |
---|
-
src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 6 import java.awt.BorderLayout; 7 import java.awt.Dimension; 7 8 import java.awt.GridBagLayout; 8 9 import java.awt.event.ActionEvent; 9 10 import java.awt.event.ActionListener; … … 62 63 /** the history combo box for the upload comment */ 63 64 private final HistoryComboBox hcbUploadComment = new HistoryComboBox(); 64 65 private final HistoryComboBox hcbUploadSource = new HistoryComboBox(); 66 private final transient JCheckBox obtainSourceAutomatically = new JCheckBox( 67 tr("Automatically obtain source from current layers")); 65 68 /** the panel with a summary of the upload parameters */ 66 69 private final UploadParameterSummaryPanel pnlUploadParameterSummary = new UploadParameterSummaryPanel(); 67 70 /** the checkbox to request feedback from other users */ … … 93 96 automaticallyAddSource(); 94 97 } 95 98 }); 96 JCheckBox obtainSourceAutomatically = new JCheckBox(tr("Automatically obtain source from current layers"));97 99 obtainSourceAutomatically.setSelected(Config.getPref().getBoolean("upload.source.obtainautomatically", false)); 98 100 obtainSourceAutomatically.addActionListener(e -> { 99 101 if (obtainSourceAutomatically.isSelected()) … … 180 182 setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); 181 183 add(buildUploadCommentPanel(), BorderLayout.NORTH); 182 184 add(pnlUploadParameterSummary, BorderLayout.CENTER); 185 Dimension dimUploadParameterSummary = pnlUploadParameterSummary.getMinimumSize(); 186 if (dimUploadParameterSummary.getHeight() <= 0) { 187 dimUploadParameterSummary.height = 80; 188 pnlUploadParameterSummary.setMinimumSize(dimUploadParameterSummary); 189 } 183 190 add(cbRequestReview, BorderLayout.SOUTH); 184 191 cbRequestReview.addItemListener(e -> changesetReviewModel.setReviewRequested(e.getStateChange() == ItemEvent.SELECTED)); 185 192 } … … 227 234 // store the history of sources 228 235 hcbUploadSource.addCurrentItemToHistory(); 229 236 Config.getPref().putList(SOURCE_HISTORY_KEY, hcbUploadSource.getHistory()); 237 238 // store current value of obtaining source automatically 239 Config.getPref().putBoolean("upload.source.obtainautomatically", obtainSourceAutomatically.isSelected()); 230 240 } 231 241 232 242 /**