Skip to content

Commit

Permalink
remove newly created way, if there is already one #23
Browse files Browse the repository at this point in the history
  • Loading branch information
r00tat committed Jul 14, 2017
1 parent 809a84f commit c91b3b9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public void createArea() {
if (way.getBBox().bounds(existingWay.getBBox().getCenter())){
log.info("existing way is inside of new building: "+existingWay.toString() + " is in " + way.toString());
Main.main.undoRedo.add(replaceWay(existingWay, way));
way = existingWay;
}
}

Expand Down Expand Up @@ -302,6 +303,7 @@ public Command replaceWay(Way existingWay, Way newWay){
for (Node newNode : newWay.getNodes()){
existingWay.addNode(newNode);
}
cmds.add(new DeleteCommand(newWay));

return new SequenceCommand(tr("replace bauilding"), cmds);
}
Expand Down

0 comments on commit c91b3b9

Please sign in to comment.