From 0106e17f07fe5ba06f51e375d667bbcba07a30fd Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 24 Sep 2020 14:43:02 -0500 Subject: Cleanup: Move function to proper section The main panel drawing funciton should be in the "Drawing" section. --- source/blender/editors/interface/interface_panel.c | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'source/blender/editors/interface/interface_panel.c') diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 1178f06b551..b9ed1688e80 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -883,6 +883,28 @@ void UI_panels_set_expansion_from_seach_filter(const bContext *C, ARegion *regio /** \name Drawing * \{ */ +/** + * Draw panels, selected (panels currently being dragged) on top. + */ +void UI_panels_draw(const bContext *C, ARegion *region) +{ + /* Draw in reverse order, because #uiBlocks are added in reverse order + * and we need child panels to draw on top. */ + LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { + if (block->active && block->panel && !(block->panel->flag & PNL_SELECT) && + !UI_block_is_search_only(block)) { + UI_block_draw(C, block); + } + } + + LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { + if (block->active && block->panel && (block->panel->flag & PNL_SELECT) && + !UI_block_is_search_only(block)) { + UI_block_draw(C, block); + } + } +} + /* Triangle 'icon' for panel header. */ void UI_draw_icon_tri(float x, float y, char dir, const float color[4]) { @@ -1944,28 +1966,6 @@ void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y) ui_panels_size(region, r_x, r_y); } -/** - * Draw panels, selected (panels currently being dragged) on top. - */ -void UI_panels_draw(const bContext *C, ARegion *region) -{ - /* Draw in reverse order, because #uiBlocks are added in reverse order - * and we need child panels to draw on top. */ - LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { - if (block->active && block->panel && !(block->panel->flag & PNL_SELECT) && - !UI_block_is_search_only(block)) { - UI_block_draw(C, block); - } - } - - LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { - if (block->active && block->panel && (block->panel->flag & PNL_SELECT) && - !UI_block_is_search_only(block)) { - UI_block_draw(C, block); - } - } -} - /** \} */ /* -------------------------------------------------------------------- */ -- cgit v1.2.3