Changeset 31839 in osm for applications/editors/josm/plugins/mapillary/src
- Timestamp:
- 2015-12-16T17:17:03+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryUploadAction.java
r31812 r31839 55 55 if (pane.getValue() != null 56 56 && (int) pane.getValue() == JOptionPane.OK_OPTION 57 && dialog. delete!= null58 && dialog. sequence.isSelected()) {57 && dialog.getDelete() != null 58 && dialog.getSequence().isSelected()) { 59 59 UploadUtils.uploadSequence( 60 60 MapillaryLayer.getInstance().getData().getSelectedImage().getSequence(), 61 dialog. delete.isSelected()61 dialog.getDelete().isSelected() 62 62 ); 63 63 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryUploadDialog.java
r31787 r31839 26 26 private static final long serialVersionUID = 2517368588113991767L; 27 27 28 /** Button group for upload options. */29 public ButtonGroup group;30 28 /** Upload the whole sequence. */ 31 p ublicJRadioButton sequence;29 private JRadioButton sequence; 32 30 /** Whether the images must be deleted after upload or not */ 33 p ublicJCheckBox delete;31 private JCheckBox delete; 34 32 35 33 /** … … 39 37 setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); 40 38 if (MapillaryUser.getUsername() != null) { 41 this.group = new ButtonGroup();39 ButtonGroup group = new ButtonGroup(); 42 40 this.sequence = new JRadioButton(tr("Upload selected sequence")); 43 if (MapillaryLayer.getInstance().getData().getSelectedImage() == null 44 || !(MapillaryLayer.getInstance().getData().getSelectedImage() instanceof MapillaryImportedImage)) 41 if (!(MapillaryLayer.getInstance().getData().getSelectedImage() instanceof MapillaryImportedImage)) { 45 42 this.sequence.setEnabled(false); 46 this.group.add(this.sequence); 43 } 44 group.add(this.sequence); 47 45 add(this.sequence); 48 this.group.setSelected(this.sequence.getModel(), true);46 group.setSelected(this.sequence.getModel(), true); 49 47 this.delete = new JCheckBox(tr("Delete after upload")); 50 this.delete.setSelected(Main.pref.getBoolean( 51 "mapillary.delete-after-upload", true)); 48 this.delete.setSelected(Main.pref.getBoolean("mapillary.delete-after-upload", true)); 52 49 add(this.delete); 53 } else 54 this.add(new JLabel( 55 "Go to setting and log in to Mapillary before uploading.")); 50 } else { 51 this.add(new JLabel(tr("Go to setting and log in to Mapillary before uploading."))); 52 } 53 } 54 55 /** 56 * @return the delete checkbox of the dialog 57 */ 58 public JCheckBox getDelete() { 59 return delete; 60 } 61 62 /** 63 * @return the sequence radio button of the dialog 64 */ 65 public JRadioButton getSequence() { 66 return sequence; 56 67 } 57 68 }
Note:
See TracChangeset
for help on using the changeset viewer.