tornavis/source/blender/editors/screen
Campbell Barton 6f21137722 Object: refactor mode switching
Functionality here has become confusing over time,
this removes duplicate, similar functions, preferring to set the mode
instead of toggle, enter, exit.

Mode switching utility function behaved differently regarding undo,
'ED_object_mode_toggle' for example didn't skip the undo push
where 'ED_object_mode_set' did.
Some callers chose these functions based on the intended undo behavior,
even when toggling didn't make sense.

There was also ED_object_mode_generic_enter which was similar to
ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit.

Simplify object mode switching internals:

- Replace ED_object_mode_generic_enter with ED_object_mode_set.
- Remove ED_object_mode_toggle as nearly all callers needed to check
  the current mode so toggling would set the mode argument correctly.
- Use ED_object_mode_set for the object mode switching operator
  to simplify logic.
- Add ED_object_mode_set_ex which has an argument to disable undo,
  needed when loading undo data needs to set the mode.
- Remove unused ED_object_mode_exit.
2020-06-03 18:29:06 +10:00
..
CMakeLists.txt Cleanup: sort CMake include paths 2019-04-24 14:41:12 +10:00
area.c UI: List Panel System 2020-05-26 15:39:49 -04:00
area_query.c Cleanup: Continue renaming ARegion variables from ar to region 2020-04-03 12:54:28 +02:00
area_utils.c Cleanup: Rename ScrArea variables from sa to area 2020-04-03 13:34:50 +02:00
glutil.c Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensure 2020-06-02 16:46:38 +02:00
screen_context.c Cleanup: Remove uneeded NULL checks on ed_screen_context 2020-05-26 15:08:45 +02:00
screen_draw.c Code Quality: Replace for loops with LISTBASE_FOREACH 2020-04-03 19:27:46 +02:00
screen_edit.c Fix for T77111: Joins Areas Without Creating Invalid Edges 2020-05-28 11:34:31 -07:00
screen_geometry.c Improved Area Border Selection and Dragging 2020-05-25 16:29:21 -07:00
screen_intern.h Fix for T77111: Joins Areas Without Creating Invalid Edges 2020-05-28 11:34:31 -07:00
screen_ops.c Fix T77000: Preferences window can not be opened from script operator 2020-05-24 16:14:11 +02:00
screen_user_menu.c Code Quality: Replace for loops with LISTBASE_FOREACH 2020-04-03 19:27:46 +02:00
screendump.c Cleanup: Rename ScrArea variables from sa to area 2020-04-03 13:34:50 +02:00
workspace_edit.c Object: refactor mode switching 2020-06-03 18:29:06 +10:00
workspace_layout_edit.c Cleanup/refactor: Workspace API, boilerplate code, early exit 2020-05-26 20:32:21 +02:00