I am unable to determine a geometry if a geometry is updated when that Change comes from the Modify tools of Scale/Move/Rotate.
What is happening is that in my module I subscribe to the RowChangedEvent. In this event, i catch when a user modifies vertices or clips an item, that way i can update that object accordingly. i do this by getting the original pre change geometry like this. This is currently working
Inspector inspr = await GetInspectorForRow(args, false);
pmi.OriginalGeometry = inspr.Shape;
Then I get the actual change in shape which I get from the arg using the following
int shapeIndex = args.Row.GetTable().GetDefinition().FindField("Shape");
Geometry geomNew = args.Row[shapeIndex] as Geometry;
if (geomNew != null)
{
pmi.NewShape = geomNew.Clone();
}
I then use the above before and after geometries to determine if the shape had changed, if so make some calculations and do work, if not, then rollback or do something else. But in comparing these two geometries, it works when it comes from edit vertices or clipping, etc.
bool shapeChanged = !pmi.OriginalGeometry.IsEqual(pmi.NewShape);
But when using Scale/Move/Rotate it sees them as the same geometry always. All of my attempts to use the following have also proven to not work.
Args.HasValueChanged
Inspector.GeometryAttribute.OriginalValue
Inspector.GeometryAttribute.CurrentValue
bool shapeChangedCorrect = !OriginalGeometry.IsEqual(NewGeometry);
Any Suggestions on what I need to do to compare the original and new value when using the modify tools? I need this as a change to an area might need to be filled in by another type of area. The original value allowed a user to roll back. But now that the above doesn't work for the modified tools, the following cancel option doesn't work for these tools either.
args.CancelEdit(() => Task.FromResult(false));