Changeset 26832 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
- Timestamp:
- 2011-10-11T21:03:06+02:00 (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
r26802 r26832 11 11 import relcontext.ChosenRelationListener; 12 12 13 public class DeleteChosenRelationAction extends AbstractAction implements ChosenRelationListener { 13 /** 14 * Make a single polygon out of the multipolygon relation. The relation must have only outer members. 15 * @author Zverik 16 */ 17 public class ReconstructPolygonAction extends AbstractAction implements ChosenRelationListener { 14 18 private ChosenRelation rel; 15 19 16 public DeleteChosenRelationAction( ChosenRelation rel ) {17 super(tr(" Delete relation"));20 public ReconstructPolygonAction( ChosenRelation rel ) { 21 super(tr("Reconstruct polygon")); 18 22 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete")); 23 putValue(LONG_DESCRIPTION, "Reconstruct polygon from multipolygon relation"); 19 24 this.rel = rel; 20 25 rel.addChosenRelationListener(this); … … 25 30 Relation r = rel.get(); 26 31 rel.clear(); 27 Main.main.undoRedo.add(new DeleteCommand(r)); 32 // Main.main.undoRedo.add(new DeleteCommand(r)); 28 33 } 29 34 30 35 public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) { 31 setEnabled(newRelation != null); 36 setEnabled(newRelation != null); //todo 32 37 } 33 38 }
Note:
See TracChangeset
for help on using the changeset viewer.
