No functional changes.
Previously, each navigation operation had its own method for restoring
the 3D View's state upon cancellation.
However, this approach did not provide significant advantages.
The number of affected variables was too small to justify considering
it for performance optimization, and the cancellation code was
duplicated across different operations.
To address this, the present commit unifies all restore code into a
single function:
- `void viewops_data_state_restore(ViewOpsData *vod);`
As a result, the `viewmove_apply_reset` function has been removed.
Moreover, since the state now has a dedicated restore function, it
seemed appropriate to create a function for capturing the state as
well.
Therefore, the code responsible for capturing the state (previously
scattered within `viewops_data_init_navigation`) has been extracted to
create the function:
- `void viewops_data_state_capture(ViewOpsData *vod);`
During this separation process, a potential error in the code was
identified, where the state may not be fully restored.
Although this issue persists, a comment has been added to clarify this
situation.
Pull Request: https://projects.blender.org/blender/blender/pulls/109760