Ticket #6853: select-way-to-be-extended-in-draw-mode-early.patch

File select-way-to-be-extended-in-draw-mode-early.patch, 1.3 KB (added by olejorgenb, 13 years ago)
  • src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    diff --git a/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java b/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
    index e8db22e..6077d42 100644
    a b public class DrawAction extends MapMode implements MapViewPaintable, SelectionCh  
    293293                // select the clicked node and do nothing else
    294294                // (this is just a convenience option so that people don't
    295295                // have to switch modes)
    296                 newSelection.clear();
    297                 newSelection.add(n);
     296
     297                // newSelection.clear(); // remove me, no effect since we return below and variable is local
     298                // newSelection.add(n);  // remove me, no effect since we return below and variable is local
     299
    298300                getCurrentDataSet().setSelected(n);
     301                // If we extend/continue an existing way, select it already now to make it obvious
     302                Way continueFrom = getWayForNode(n);
     303                if (continueFrom != null) {
     304                    getCurrentDataSet().addSelected(continueFrom);
     305                }
     306
    299307                // The user explicitly selected a node, so let him continue drawing
    300308                wayIsFinished = false;
    301309                return;