Changeset 353 in josm for trunk/src


Ignore:
Timestamp:
2007-10-09T12:16:40+02:00 (17 years ago)
Author:
gebner
Message:

Fix bug #375.

Maybe the add node and connect code should be a bit restructured, I introduced
this error when I made it reuse old ways more often.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/AddNodeAction.java

    r351 r353  
    181181                                 * which we insert the node.
    182182                                 */
    183                                 Way newInsertInto = null;
     183                                Way wayInsertedInto = null;
    184184                                if (insertInto != null)
    185                                         newInsertInto = splitWaySegmentAtNode(insertInto, n, cmds);
     185                                        wayInsertedInto = splitWaySegmentAtNode(insertInto, n, cmds);
    186186
    187187                                Way way = getWayForNode(n1);
     
    191191                                        cmds.add(new AddCommand(way));
    192192                                } else {
    193                                         if (insertInto != null) {
    194                                                 if (way == insertInto.way) {
    195                                                         way = newInsertInto;
    196                                                 }
     193                                        if (insertInto != null && way == insertInto.way) {
     194                                                way = wayInsertedInto;
    197195                                        } else {
    198196                                                Way wnew = new Way(way);
Note: See TracChangeset for help on using the changeset viewer.