Changeset 10656 in osm for applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin
- Timestamp:
- 2008-09-12T19:46:36+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin/src/UtilsPlugin/SimplifyWayAction.java
r9370 r10656 11 11 import java.util.LinkedList; 12 12 import java.util.List; 13 14 import javax.swing.JOptionPane; 13 15 14 16 import org.openstreetmap.josm.Main; … … 35 37 Collection<OsmPrimitive> selection = Main.ds.getSelected(); 36 38 39 int ways = 0; 40 for (OsmPrimitive prim : selection) { 41 if (prim instanceof Way) { 42 ways++; 43 } 44 } 45 46 if (ways == 0) { 47 JOptionPane.showMessageDialog(Main.parent, 48 tr("Please select at least one way to simplify.")); 49 return; 50 } else if (ways > 10) { 51 int option = JOptionPane.showConfirmDialog(Main.parent, 52 tr("The selection contains {0} ways. Are you sure you want to simplify them all?", ways), tr("Are you sure?"), JOptionPane.YES_NO_OPTION); 53 if (option != JOptionPane.YES_OPTION) 54 return; 55 } 56 37 57 for (OsmPrimitive prim : selection) { 38 58 if (prim instanceof Way) {
Note:
See TracChangeset
for help on using the changeset viewer.