Ignore:
Timestamp:
2011-10-11T21:03:06+02:00 (14 years ago)
Author:
zverik
Message:

working with arcs was a bad decision. Commit code before I rip all that out

File:
1 copied

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java

    r26802 r26832  
    1111import relcontext.ChosenRelationListener;
    1212
    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 */
     17public class ReconstructPolygonAction extends AbstractAction implements ChosenRelationListener {
    1418    private ChosenRelation rel;
    1519
    16     public DeleteChosenRelationAction( ChosenRelation rel ) {
    17         super(tr("Delete relation"));
     20    public ReconstructPolygonAction( ChosenRelation rel ) {
     21        super(tr("Reconstruct polygon"));
    1822        putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
     23        putValue(LONG_DESCRIPTION, "Reconstruct polygon from multipolygon relation");
    1924        this.rel = rel;
    2025        rel.addChosenRelationListener(this);
     
    2530        Relation r = rel.get();
    2631        rel.clear();
    27         Main.main.undoRedo.add(new DeleteCommand(r));
     32//        Main.main.undoRedo.add(new DeleteCommand(r));
    2833    }
    2934
    3035    public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) {
    31         setEnabled(newRelation != null);
     36        setEnabled(newRelation != null); //todo
    3237    }
    3338}
Note: See TracChangeset for help on using the changeset viewer.