Ignore:
Timestamp:
2012-07-28T21:41:33+02:00 (12 years ago)
Author:
bastiK
Message:

fixed #7032 - can't easily add tags to recently drawn way

File:
1 edited

Legend:

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

    r5282 r5378  
    11711171        }
    11721172        return rv;
     1173    }
     1174
     1175    /**
     1176     * Get selected primitives, while draw action is in progress.
     1177     *
     1178     * While drawing a way, technically the last node is selected.
     1179     * This is inconvenient when the user tries to add tags to the
     1180     * way using a keyboard shortcut. In that case, this method returns
     1181     * the current way as selection, to work around this issue.
     1182     * Otherwise the normal selection of the current data layer is returned.
     1183     */
     1184    public Collection<OsmPrimitive> getInProgressSelection() {
     1185        DataSet ds = getCurrentDataSet();
     1186        if (ds == null) return null;
     1187        if (currentBaseNode != null && !ds.getSelected().isEmpty()) {
     1188            Way continueFrom = getWayForNode(currentBaseNode);
     1189            if (alt && continueFrom != null) {
     1190                return Collections.<OsmPrimitive>singleton(continueFrom);
     1191            }
     1192        }
     1193        return ds.getSelected();
    11731194    }
    11741195
Note: See TracChangeset for help on using the changeset viewer.