Ticket #2241: This Haunts Me.patch

File This Haunts Me.patch, 1.4 KB (added by xeen, 17 years ago)
  • src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

     
    805805    }
    806806
    807807    public void paint(Graphics g, MapView mv) {
    808         if (!drawHelperLine) return;
     808        if (!drawHelperLine || wayIsFinished) return;
    809809
    810810        // sanity checks
    811811        if (Main.map.mapView == null) return;
     
    881881        /*
    882882         * Check whether a connection will be made
    883883         */
    884         if (currentBaseNode != null) {
     884        if (currentBaseNode != null && !wayIsFinished) {
    885885            if(alt)
    886886                rv += " " + tr("Start new way from last node.");
    887887            else
    888888                rv += " " + tr("Continue way from last node.");
    889889        }
    890 
     890       
     891        Node n = mouseOnExistingNode;
    891892        /*
    892893         * Handle special case: Highlighted node == selected node => finish drawing
    893894         */
    894         Node n = mouseOnExistingNode;
     895       
    895896        if(n != null && Main.ds.getSelectedNodes().contains(n)) {
    896             rv = tr("Finish drawing.");
     897            if(wayIsFinished)
     898                rv = tr("Select node under cursor.");
     899            else
     900                rv = tr("Finish drawing.");
    897901        }
    898902
    899903        /*