[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59804] branches/soc-2013-ui_replay/source /blender/editors/space_view3d/view3d_toolbar.c: The toolbar did not properly redraw when a panel was hidden in case the region overlap was off .

Vincent Akkermans vincent at ack-err.net
Wed Sep 4 17:02:59 CEST 2013


Revision: 59804
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59804
Author:   ack-err
Date:     2013-09-04 15:02:59 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
The toolbar did not properly redraw when a panel was hidden in case the region overlap was off.

Modified Paths:
--------------
    branches/soc-2013-ui_replay/source/blender/editors/space_view3d/view3d_toolbar.c

Modified: branches/soc-2013-ui_replay/source/blender/editors/space_view3d/view3d_toolbar.c
===================================================================
--- branches/soc-2013-ui_replay/source/blender/editors/space_view3d/view3d_toolbar.c	2013-09-04 14:58:18 UTC (rev 59803)
+++ branches/soc-2013-ui_replay/source/blender/editors/space_view3d/view3d_toolbar.c	2013-09-04 15:02:59 UTC (rev 59804)
@@ -122,16 +122,12 @@
 	CTX_wm_region_set((bContext *)C, ar);
 }
 
-static void active_panel_menu_popup_cb(bContext *C, void *arg, int event)
+static void active_panel_menu_popup_cb(bContext *UNUSED(C), void *arg_ar, int UNUSED(event))
 {
-	printf("button callback\n");
+	ARegion *ar = (ARegion *)arg_ar;
+	ED_region_tag_redraw(ar);
 }
 
-static void active_panel_menu_popup_button_cb(bContext *C, void *arg1, void *arg2)
-{
-		printf("popup callback\n");
-}
-
 static int sort_panels_by_sortorder(void *o1, void *o2)
 {
 	Panel *pa1 = (Panel*)o1;
@@ -155,7 +151,7 @@
 	block = uiBeginBlock(C, cur_ar, __func__, UI_EMBOSS);
 	uiBlockClearFlag(block, UI_BLOCK_LOOP);
 	uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_MOVEMOUSE_QUIT);
-	uiBlockSetHandleFunc(block, active_panel_menu_popup_cb, NULL);
+	uiBlockSetHandleFunc(block, active_panel_menu_popup_cb, ar);
 	
 	layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, style->panelspace, 0, width - 2 * style->panelspace, height, style);
 	col = uiLayoutColumn(layout, TRUE);
@@ -173,7 +169,6 @@
 		
 		uiLayoutRow(col, TRUE);
 		but = uiDefButBitI(block, OPTIONN, 1, 0, pa->drawname, 0, 0, width, UI_UNIT_Y, (int*)&pa->hidden, 0, 0, 0, 0, "Check to hide panel");
-		uiButSetFunc(but, active_panel_menu_popup_button_cb, pa, NULL);
 	}
 	CTX_wm_region_set(C, cur_ar);
 	




More information about the Bf-blender-cvs mailing list