Changeset 32517 in osm for applications/editors/josm/plugins/simplifyarea/src/sk
- Timestamp:
- 2016-07-02T00:18:48+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaAction.java
r30791 r32517 48 48 49 49 private List<Bounds> getCurrentEditBounds() { 50 return Main. main.getEditLayer().data.getDataSourceBounds();50 return Main.getLayerManager().getEditLayer().data.getDataSourceBounds(); 51 51 } 52 52 … … 65 65 return 0 == HelpAwareOptionPane.showOptionDialog( 66 66 Main.parent, 67 "<html>" + trn("The selected way has nodes outside of the downloaded data region.", "The selected ways have nodes outside of the downloaded data region.", getCurrentDataSet().getSelectedWays().size()) 67 "<html>" + trn("The selected way has nodes outside of the downloaded data region.", "The selected ways have nodes outside of the downloaded data region.", 68 Main.getLayerManager().getEditDataSet().getSelectedWays().size()) 68 69 + "<br>" + tr("This can lead to nodes being deleted accidentally.") + "<br>" + tr("Do you want to delete them anyway?") + "</html>", 69 70 tr("Delete nodes outside of data regions?"), JOptionPane.WARNING_MESSAGE, null, // no special icon … … 78 79 final ButtonSpec[] options = new ButtonSpec[] { new ButtonSpec(tr("Yes"), ImageProvider.get("ok"), tr("Simplify all selected ways"), null), 79 80 new ButtonSpec(tr("Cancel"), ImageProvider.get("cancel"), tr("Cancel operation"), null) }; 80 return 0 == HelpAwareOptionPane.showOptionDialog(Main.parent, tr("The selection contains {0} ways. Are you sure you want to simplify them all?", numWays), tr("Simplify ways?"), 81 return 0 == HelpAwareOptionPane.showOptionDialog(Main.parent, tr("The selection contains {0} ways. Are you sure you want to simplify them all?", numWays), 82 tr("Simplify ways?"), 81 83 JOptionPane.WARNING_MESSAGE, null, // no special icon 82 84 options, options[0], null); … … 85 87 @Override 86 88 public void actionPerformed(final ActionEvent e) { 87 final Collection<OsmPrimitive> selection = get CurrentDataSet().getSelected();89 final Collection<OsmPrimitive> selection = getLayerManager().getEditDataSet().getSelected(); 88 90 89 91 final List<Bounds> bounds = getCurrentEditBounds(); … … 449 451 @Override 450 452 protected void updateEnabledState() { 451 if (get CurrentDataSet() == null) {453 if (getLayerManager().getEditDataSet() == null) { 452 454 setEnabled(false); 453 455 } else { 454 updateEnabledState(get CurrentDataSet().getSelected());456 updateEnabledState(getLayerManager().getEditDataSet().getSelected()); 455 457 } 456 458 }
Note:
See TracChangeset
for help on using the changeset viewer.