diff options
author | Hans Goudey <h.goudey@me.com> | 2020-09-24 22:43:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-09-24 22:43:02 +0300 |
commit | 0106e17f07fe5ba06f51e375d667bbcba07a30fd (patch) | |
tree | d894fb1d5ca6af6df268372257813212ce1c23bc /source/blender/editors/interface/interface_panel.c | |
parent | 80c57fe35f188c3fbeb2f038888ebca6bf237883 (diff) |
Cleanup: Move function to proper section
The main panel drawing funciton should be in the "Drawing" section.
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 44 |
1 files changed, 22 insertions, 22 deletions
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); - } - } -} - /** \} */ /* -------------------------------------------------------------------- */ |