Ticket #5728: joinarea-setselection.patch

File joinarea-setselection.patch, 962 bytes (added by KalleLampila, 11 years ago)
  • src/org/openstreetmap/josm/actions/JoinAreasAction.java

    diff --git a/src/org/openstreetmap/josm/actions/JoinAreasAction.java b/src/org/openstreetmap/josm/actions/JoinAreasAction.java
    index 9f09741..ed31d60 100644
    a b public class JoinAreasAction extends JosmAction { 
    373373            if (result.hasChanges) {
    374374
    375375                Main.map.mapView.repaint();
     376                List<Way> allWays = new ArrayList<Way>();
     377                for (Multipolygon pol : result.polygons) {
     378                    allWays.add(pol.outerWay);
     379                    allWays.addAll(pol.innerWays);
     380                }
    376381                DataSet ds = Main.main.getCurrentDataSet();
     382                ds.setSelected(allWays,false);
    377383                ds.fireSelectionChanged();
    378384            } else {
    379385                JOptionPane.showMessageDialog(Main.parent, tr("No intersection found. Nothing was changed."));