AnsweredAssumed Answered

args.CancelEdit BUG when using Move/Scale/Rotate

Question asked by mjk5000 on May 18, 2018
Latest reply on May 22, 2018 by rbrennan-esristaff

I need to prevent my users from Reshaping my polygons if that polygon has been approved/verified by the field managers.  So I need to catch and rollback(canceledit()) those shape changes in the RowChangeEvent of the Module.  This works for catching vertices changes and the following is able to rollback that change

 

if (pmi.HasShapeChanged && !canChange) //Locked Area Rollback
{
   // CANCEL the Change to the currently selected
   ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Changes Not Allowed to Area Verified Field!", "Area Verified", MessageBoxButton.OK, MessageBoxImage.Exclamation);

   //CANCEL the Change works for edit vertices
   args.CancelEdit(() => Task.FromResult(false));
}

 

The problem now, is that I discovered that when the Rotate/Scale/Move modify tools are used, args.CancelEdit doesn't roll back/cancel the change like it does for the edit vertices.  I am using a feature service and need to continue to roll back any shape changes on my verified geometries.  Is this a bug in that the arg when created with the Rotate/Scale/Move doesn't have the original geometry to rollback to like it does for edit vertices?

Outcomes