Changeset 15823 in josm
- Timestamp:
- 2020-02-06T21:51:52+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DownloadAlongWayAction.java
r15363 r15823 43 43 @Override 44 44 protected PleaseWaitRunnable createTask() { 45 Collection<Way> selectedWays = getLayerManager().getEditDataSet().getSelectedWays(); 46 45 Collection<Way> selectedWays = getLayerManager().getActiveDataSet().getSelectedWays(); 47 46 if (selectedWays.isEmpty()) { 48 47 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Please select 1 or more ways to download along")); -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java
r15586 r15823 152 152 * @param listener The listener that will be notified of each combobox change 153 153 */ 154 protected final void addChangeListener(ChangeListener listener) { 154 protected final void addAndFireChangeListener(ChangeListener listener) { 155 155 cbDownloadGpxData.addChangeListener(listener); 156 156 cbDownloadOsmData.addChangeListener(listener); 157 listener.stateChanged(null); 157 158 } 158 159 … … 185 186 }; 186 187 187 addChangeListener(e -> options[0].setEnabled(isDownloadOsmData() || isDownloadGpxData())); 188 addAndFireChangeListener(e -> { 189 boolean somethingToDownload = isDownloadOsmData() || isDownloadGpxData(); 190 options[0].setEnabled(somethingToDownload && MainApplication.getLayerManager().getEditLayer() != null); 191 options[1].setEnabled(somethingToDownload); 192 }); 188 193 189 194 int ret = HelpAwareOptionPane.showOptionDialog(MainApplication.getMainFrame(), this, title,
Note:
See TracChangeset
for help on using the changeset viewer.