I have code that checks certain things in the EditCompleted event in a Pro extension. If certain conditions aren't met for certain edits I'd like to cancel the edit operation. Is it appropriate to call
Project.Current.UndoEditAsync();
inside the EditCompleted event?
I'm concerned that the edit that is just completing hasn't been added to the edit stack yet and I might actually undo a previous edit. Testing don't indicate this is a problem but I want to make sure.
Solved! Go to Solution.
this might help : ProConcepts-Editing#editcompletedevent . The edit has completed so u wont "skip" it if that is what u r wondering....
That said, if u do execute Project.Current.UndoEditAsync() within the event I would expect it to be re-entrant so be prepared to deal with that (and not end up in a continuous loop)
Refer to EditCompletedType on the event args
this might help : ProConcepts-Editing#editcompletedevent . The edit has completed so u wont "skip" it if that is what u r wondering....
That said, if u do execute Project.Current.UndoEditAsync() within the event I would expect it to be re-entrant so be prepared to deal with that (and not end up in a continuous loop)
Refer to EditCompletedType on the event args
Great. Thank you for the clarification and the advice.