Changeset 3449 in josm


Ignore:
Timestamp:
2010-08-20T13:07:55+02:00 (14 years ago)
Author:
bastiK
Message:

see #5179 (patch by viesturs) - Fixed "nothing changed" popup (Join overlapping areas produces bad results)

File:
1 edited

Legend:

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

    r3445 r3449  
    1919import java.util.List;
    2020import java.util.Map;
     21import java.util.Map.Entry;
    2122import java.util.Set;
    2223import java.util.TreeMap;
    2324import java.util.TreeSet;
    24 import java.util.Map.Entry;
    2525
    2626import javax.swing.Box;
     
    209209        }
    210210
    211         if (checkForTagConflicts(ways.getFirst(), ways.getLast())) {
    212             //do nothing. //FIXME: abort?
    213         }
     211        if (checkForTagConflicts(ways.getFirst(), ways.getLast()))
     212            //there was conflicts and user canceled abort the action.
     213            return;
     214
    214215
    215216        JoinAreasResult result = joinAreas(ways.getFirst(), ways.getLast());
     
    306307        }
    307308
     309        result.hasChanges = true;
    308310        result.mergeSuccessful = true;
    309311        result.outerWay = outerWay;
     
    742744            if (bestWay == null)
    743745                throw new RuntimeException();
    744             else if (outerWays.contains(bestWay))
     746            else if (outerWays.contains(bestWay)) {
    745747                break; //full circle reached, terminate.
    746             else {
     748            } else {
    747749                //add to outer ways, repeat.
    748750                outerWays.add(bestWay);
Note: See TracChangeset for help on using the changeset viewer.