Ticket #5179: osm-join-areas-6.1.patch

File osm-join-areas-6.1.patch, 1.9 KB (added by extropy, 14 years ago)

Fixed nothing changed popup.

  • src/org/openstreetmap/josm/actions/JoinAreasAction.java

    ### Eclipse Workspace Patch 1.0
    #P JOSM
     
    1818import java.util.LinkedList;
    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;
    2727import javax.swing.JComboBox;
     
    208208            }
    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;
    214214
     215
    215216        JoinAreasResult result = joinAreas(ways.getFirst(), ways.getLast());
    216217
    217218        if (result.hasChanges) {
     
    305306            JOptionPane.showMessageDialog(Main.parent, tr("Some of the ways were part of relations that have been modified. Please verify no errors have been introduced."));
    306307        }
    307308
     309        result.hasChanges = true;
    308310        result.mergeSuccessful = true;
    309311        result.outerWay = outerWay;
    310312        result.innerWays = newInnerWays;
     
    741743
    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);
    749751                result.add(new WayInPath(bestWay, bestWayReverse));