Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_ops.c
| Show First 20 Lines • Show All 729 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Internal Screen Utilities | /** \name Internal Screen Utilities | ||||
| * \{ */ | * \{ */ | ||||
| static bool screen_active_editable(bContext *C) | static bool screen_active_editable(bContext *C) | ||||
| { | { | ||||
| if (ED_operator_screenactive(C)) { | if (ED_operator_screenactive(C)) { | ||||
| /* no full window splitting allowed */ | /* no full window or temp window splitting allowed */ | ||||
| if (CTX_wm_screen(C)->state != SCREENNORMAL) { | const bScreen *scr = CTX_wm_screen(C); | ||||
| if (scr->state != SCREENNORMAL || scr->temp) { | |||||
| return false; | return false; | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| ▲ Show 20 Lines • Show All 4,728 Lines • ▼ Show 20 Lines | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Space Type Set or Cycle Operator | /** \name Space Type Set or Cycle Operator | ||||
| * \{ */ | * \{ */ | ||||
| static bool space_type_set_or_cycle_poll(bContext *C) | static bool space_type_set_or_cycle_poll(bContext *C) | ||||
| { | { | ||||
| bScreen *screen = CTX_wm_screen(C); | |||||
Severin: Unused. | |||||
| ScrArea *area = CTX_wm_area(C); | ScrArea *area = CTX_wm_area(C); | ||||
| return (area && !ELEM(area->spacetype, SPACE_TOPBAR, SPACE_STATUSBAR)); | return (area && !ELEM(area->spacetype, SPACE_TOPBAR, SPACE_STATUSBAR) && screen_active_editable(C)); | ||||
| } | } | ||||
| static int space_type_set_or_cycle_exec(bContext *C, wmOperator *op) | static int space_type_set_or_cycle_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| const int space_type = RNA_enum_get(op->ptr, "space_type"); | const int space_type = RNA_enum_get(op->ptr, "space_type"); | ||||
| PointerRNA ptr; | PointerRNA ptr; | ||||
| ScrArea *area = CTX_wm_area(C); | ScrArea *area = CTX_wm_area(C); | ||||
| ▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines | |||||
Unused.