Changeset 5104 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode
- Timestamp:
- 2012-03-18T20:45:59+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r5100 r5104 141 141 // repaint required if the helper line is active. 142 142 boolean needsRepaint = drawHelperLine && !wayIsFinished; 143 // move newHighlights to oldHighlights; only update changed primitives 144 for(OsmPrimitive x : newHighlights) { 145 if(oldHighlights.contains(x)) { 146 continue; 147 } 148 needsRepaint = true; 149 x.setHighlighted(true); 150 } 151 oldHighlights.removeAll(newHighlights); 152 for(OsmPrimitive x : oldHighlights) { 153 x.setHighlighted(false); 154 needsRepaint = true; 155 } 143 if(drawTargetHighlight) { 144 // move newHighlights to oldHighlights; only update changed primitives 145 for(OsmPrimitive x : newHighlights) { 146 if(oldHighlights.contains(x)) { 147 continue; 148 } 149 x.setHighlighted(true); 150 needsRepaint = true; 151 } 152 oldHighlights.removeAll(newHighlights); 153 for(OsmPrimitive x : oldHighlights) { 154 x.setHighlighted(false); 155 needsRepaint = true; 156 } 157 } 158 // required in order to print correct help text 156 159 oldHighlights = newHighlights; 157 160 158 if ( (!drawHelperLine || wayIsFinished)&& !drawTargetHighlight)161 if (!needsRepaint && !drawTargetHighlight) 159 162 return false; 160 163
Note:
See TracChangeset
for help on using the changeset viewer.