[Bf-blender-cvs] [0106e17f07f] master: Cleanup: Move function to proper section

Hans Goudey noreply at git.blender.org
Thu Sep 24 21:43:24 CEST 2020


Commit: 0106e17f07fe5ba06f51e375d667bbcba07a30fd
Author: Hans Goudey
Date:   Thu Sep 24 14:43:02 2020 -0500
Branches: master
https://developer.blender.org/rB0106e17f07fe5ba06f51e375d667bbcba07a30fd

Cleanup: Move function to proper section

The main panel drawing funciton should be in the "Drawing" section.

===================================================================

M	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, &region->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, &region->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, &region->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, &region->uiblocks) {
-    if (block->active && block->panel && (block->panel->flag & PNL_SELECT) &&
-        !UI_block_is_search_only(block)) {
-      UI_block_draw(C, block);
-    }
-  }
-}
-
 /** \} */
 
 /* -------------------------------------------------------------------- */



More information about the Bf-blender-cvs mailing list