Changeset 30927 in osm
- Timestamp:
- 2015-01-26T20:34:28+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/tracer2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tracer2/build.xml
r30416 r30927 3 3 4 4 <!-- enter the SVN commit message --> 5 <property name="commit.message" value=" Add link to wiki"/>5 <property name="commit.message" value="Fix Bug #10834"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 7 <property name="plugin.main.version" value="7001"/> -
applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/ConnectWays.java
r30737 r30927 153 153 s_bAlt = alt; 154 154 155 boolean bAddWay = false; 156 155 157 calcDistance(); 156 158 getNodes(newWay); … … 161 163 if (s_oWayOld == null) { 162 164 s_bAddNewWay = true; 163 cmds.add(new AddCommand(newWay)); 165 //cmds.add(new AddCommand(newWay)); 166 bAddWay = true; 164 167 s_oWayOld = newWay; 165 168 s_oWay = new Way( newWay ); … … 195 198 cmds2.addAll(connectTo()); 196 199 200 // add new Node 201 Node firstNode = null; 202 Way way = new Way(s_oWay); 203 for (Node node : s_oWay.getNodes()) { 204 if ( node.getDataSet() != null ) 205 { 206 way.removeNode(node); 207 } 208 } 209 if ( way.getNodes().size() > 0 ) 210 { 211 if (way.firstNode() != way.lastNode() ) 212 { 213 way.addNode(way.firstNode()); 214 } 215 for (Node node : way.getNodes()) 216 { 217 if (firstNode == null || firstNode != node) { 218 cmds.add(new AddCommand(node)); 219 } 220 if (firstNode == null) { 221 firstNode = node; 222 } 223 } 224 } 225 226 // add new way 227 if ( bAddWay == true ) 228 { 229 cmds.add(new AddCommand(s_oWay)); 230 } 231 197 232 cmds.add(new ChangeCommand(s_oWayOld, trySplitWayByAnyNodes(s_oWay))); 198 233 } … … 288 323 newWay.removeNode(n1); 289 324 // cmds.add(new ChangeCommand(m_way, newWay)); 325 326 if (newWay.firstNode() != newWay.lastNode() ) 327 { 328 newWay.addNode(newWay.firstNode()); 329 } 290 330 s_oWay = new Way(newWay); 291 331 292 cmds.add(new DeleteCommand(n1)); 332 //cmds.add(new DeleteCommand(n1)); 293 333 return cmds; 294 334 } -
applications/editors/josm/plugins/tracer2/src/org/openstreetmap/josm/plugins/tracer2/TracerAction.java
r30737 r30927 320 320 firstNode = node; 321 321 } 322 commands.add(new AddCommand(node)); 322 //commands.add(new AddCommand(node)); 323 323 way.addNode(node); 324 324 }
Note:
See TracChangeset
for help on using the changeset viewer.