diff options
Diffstat (limited to 'source/blender/editors/space_text/text_header.c')
-rw-r--r-- | source/blender/editors/space_text/text_header.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 1a6d3181349..50a8739c5b4 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -54,21 +54,21 @@ static ARegion *text_has_properties_region(ScrArea *sa) ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); if (ar) return ar; - + /* add subdiv level; after header */ ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); /* is error! */ if (ar == NULL) return NULL; - + arnew = MEM_callocN(sizeof(ARegion), "properties region"); - + BLI_insertlinkafter(&sa->regionbase, ar, arnew); arnew->regiontype = RGN_TYPE_UI; arnew->alignment = RGN_ALIGN_LEFT; - + arnew->flag = RGN_FLAG_HIDDEN; - + return arnew; } @@ -81,7 +81,7 @@ static int text_properties_exec(bContext *C, wmOperator *UNUSED(op)) { ScrArea *sa = CTX_wm_area(C); ARegion *ar = text_has_properties_region(sa); - + if (ar) ED_region_toggle_hidden(C, ar); @@ -94,7 +94,7 @@ void TEXT_OT_properties(wmOperatorType *ot) ot->name = "Properties"; ot->description = "Toggle the properties region visibility"; ot->idname = "TEXT_OT_properties"; - + /* api callbacks */ ot->exec = text_properties_exec; ot->poll = text_properties_poll; @@ -105,15 +105,15 @@ static int text_text_search_exec(bContext *C, wmOperator *UNUSED(op)) ScrArea *sa = CTX_wm_area(C); ARegion *ar = text_has_properties_region(sa); SpaceText *st = CTX_wm_space_text(C); - + if (ar) { if (ar->flag & RGN_FLAG_HIDDEN) ED_region_toggle_hidden(C, ar); - + /* cannot send a button activate yet for case when region wasn't visible yet */ /* flag gets checked and cleared in main draw callback */ st->flags |= ST_FIND_ACTIVATE; - + ED_region_tag_redraw(ar); } return OPERATOR_FINISHED; @@ -126,7 +126,7 @@ void TEXT_OT_start_find(wmOperatorType *ot) ot->name = "Find"; ot->description = "Start searching text"; ot->idname = "TEXT_OT_start_find"; - + /* api callbacks */ ot->exec = text_text_search_exec; ot->poll = text_properties_poll; |