Changeset 1447 in josm for trunk


Ignore:
Timestamp:
2009-02-27T08:55:07+01:00 (16 years ago)
Author:
stoecker
Message:

fix #2240 and #2241. patch by xeen

File:
1 edited

Legend:

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

    r1444 r1447  
    243243        if(!Main.map.mapView.isDrawableLayer())
    244244            return;
     245        wayIsFinished = false;
    245246        computeHelperLine();
    246247        addHighlighting();
     
    806807
    807808    public void paint(Graphics g, MapView mv) {
    808         if (!drawHelperLine) return;
     809        if (!drawHelperLine || wayIsFinished) return;
    809810
    810811        // sanity checks
     
    882883         * Check whether a connection will be made
    883884         */
    884         if (currentBaseNode != null) {
     885        if (currentBaseNode != null && !wayIsFinished) {
    885886            if(alt)
    886887                rv += " " + tr("Start new way from last node.");
     
    888889                rv += " " + tr("Continue way from last node.");
    889890        }
    890 
     891       
     892        Node n = mouseOnExistingNode;
    891893        /*
    892894         * Handle special case: Highlighted node == selected node => finish drawing
    893895         */
    894         Node n = mouseOnExistingNode;
     896       
    895897        if(n != null && Main.ds.getSelectedNodes().contains(n)) {
    896             rv = tr("Finish drawing.");
     898            if(wayIsFinished)
     899                rv = tr("Select node under cursor.");
     900            else
     901                rv = tr("Finish drawing.");
    897902        }
    898903
Note: See TracChangeset for help on using the changeset viewer.