Select to view content in your preferred language

Bug in Draw.UndoLastVertex ?

1595
4
08-10-2012 12:07 PM
JoshPorter
Occasional Contributor
The first call to undo last vertex does nothing, and calling it a second time actually removes the last vertex.  Has anyone else noticed this?

To confirm the number of vertices in the shape being drawn, i am incrementing a counter in the Draw.VertexAdded event handler. The counter is incrementing as one would expect, at every click or call to AddVertex while the Draw object IsEnabled. But the call to UndoLastVertex consistently takes two calls to remove one vertex.  Can anyone confirm this?
0 Kudos
4 Replies
JoshPorter
Occasional Contributor
Only need to call this twice for polygons. For polylines it works just fine the first time.
0 Kudos
TomRippetoe
Deactivated User
Did you ever get any response to your question? or develop a work around? I am seeing the same behavior for polygons (not polylines).   I am using version 3.0.0.388 of the Silverlight client library.

thanks.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Thanks for reporting this issue, we'll try to get it fixed in a future version.
0 Kudos
samulineuvonen
Deactivated User
Hello,

Just to update: seems to me this bug still exists (API version 3.0). At least for my application the workaround was to simply check EditMode and call undo twice for polygons.

this.MeasureDrawObject.UndoLastVertex();
if (this.MeasureDrawObject.DrawMode==DrawMode.Polygon)  //BUG: polygons need two calls
{
     this.MeasureDrawObject.UndoLastVertex();
}


Regards,
Samuli N.
0 Kudos