Ignore:
Timestamp:
2012-10-15T23:04:55+02:00 (12 years ago)
Author:
zverik
Message:

Fix #8062

Location:
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions
Files:
2 edited

Legend:

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

    r25711 r28813  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44import java.awt.event.ActionEvent;
     5import java.util.Collections;
    56import javax.swing.AbstractAction;
    67import org.openstreetmap.josm.Main;
     8import org.openstreetmap.josm.command.Command;
    79import org.openstreetmap.josm.command.DeleteCommand;
    810import org.openstreetmap.josm.data.osm.Relation;
     
    2527        Relation r = rel.get();
    2628        rel.clear();
    27         Main.main.undoRedo.add(new DeleteCommand(r));
     29        Command c = DeleteCommand.delete(Main.main.getEditLayer(), Collections.singleton(r), true, true);
     30        if( c != null )
     31            Main.main.undoRedo.add(c);
    2832    }
    2933
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java

    r26882 r28813  
    6464        List<Way> newSelection = new ArrayList<Way>();
    6565        List<Command> commands = new ArrayList<Command>();
    66         commands.add(new DeleteCommand(r));
     66        Command c = DeleteCommand.delete(Main.main.getEditLayer(), Collections.singleton(r), true, true);
     67        if( c == null )
     68            return;
     69        commands.add(c);
    6770       
    6871        for( JoinedPolygon p : mpc.outerWays ) {
Note: See TracChangeset for help on using the changeset viewer.