Prevents undo push when no cut has been made.
Details
Details
- Reviewers
Campbell Barton (campbellbarton) - Maniphest Tasks
- T96424: Knife tool creates an undo step even there is no cut over object
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
This seems a nice improvement, although instead of becoming responsible for the undo push, the operator can return OPERATOR_CANCELLED to prevent the undo push, then the operator's flag can be left as-is.
Comment Actions
Make requested change
Edit: can we simply use ternary conditional operator?
return (kcd->totkvert == 0) ? OPERATOR_CANCELLED : OPERATOR_FINISHED;