- Timestamp:
- 2015-12-29T21:01:48+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java
r8987 r9215 92 92 /** 93 93 * Converts a {@link MarkerLayer} to a {@link OsmDataLayer}. 94 * @param layer marker layer 94 95 */ 95 96 public FromMarkerLayer(MarkerLayer layer) { -
trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java
r9078 r9215 44 44 45 45 private final GpxLayer layer; 46 private JRadioButton link, include; 46 private JRadioButton link; 47 private JRadioButton include; 47 48 private JCheckBox export; 48 49 50 /** 51 * Constructs a new {@code GpxTracksSessionExporter}. 52 * @param layer GPX layer to export 53 */ 49 54 public GpxTracksSessionExporter(GpxLayer layer) { 50 55 this.layer = layer; … … 78 83 JPanel cardLink = new JPanel(new GridBagLayout()); 79 84 final File file = layer.getAssociatedFile(); 80 if (file != null ) {85 if (file != null && file.exists()) { 81 86 JosmTextField tf = new JosmTextField(); 82 87 tf.setText(file.getPath()); … … 97 102 cards.add(cardInclude, "include"); 98 103 99 if (file != null ) {104 if (file != null && file.exists()) { 100 105 link.setSelected(true); 101 106 } else { … … 136 141 } else { 137 142 GuiHelper.setEnabledRec(p, true); 138 link.setEnabled(file != null );143 link.setEnabled(file != null && file.exists()); 139 144 } 140 145 } -
trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java
r9078 r9215 49 49 50 50 private final OsmDataLayer layer; 51 private JRadioButton link, include; 51 private JRadioButton link; 52 private JRadioButton include; 52 53 private JCheckBox export; 53 54 55 /** 56 * Constructs a new {@code OsmDataSessionExporter}. 57 * @param layer Data layer to export 58 */ 54 59 public OsmDataSessionExporter(OsmDataLayer layer) { 55 60 this.layer = layer; … … 62 67 63 68 private class LayerSaveAction extends AbstractAction { 69 /** 70 * Constructs a new {@code LayerSaveAction}. 71 */ 64 72 LayerSaveAction() { 65 73 putValue(SMALL_ICON, new ImageProvider("save").setWidth(16).get()); … … 105 113 final LayerSaveAction saveAction = new LayerSaveAction(); 106 114 final JButton save = new JButton(saveAction); 107 if (file != null ) {115 if (file != null && file.exists()) { 108 116 JosmTextField tf = new JosmTextField(); 109 117 tf.setText(file.getPath()); … … 126 134 cards.add(cardInclude, "include"); 127 135 128 if (file != null ) {136 if (file != null && file.exists()) { 129 137 link.setSelected(true); 130 138 } else { … … 166 174 GuiHelper.setEnabledRec(p, true); 167 175 save.setEnabled(saveAction.isEnabled()); 168 link.setEnabled(file != null );176 link.setEnabled(file != null && file.exists()); 169 177 } 170 178 }
Note:
See TracChangeset
for help on using the changeset viewer.