[Bf-blender-cvs] [a7cb120] temp_widgets_update_tagging: Fix some missing updates
Julian Eisel
noreply at git.blender.org
Fri Apr 15 23:40:03 CEST 2016
Commit: a7cb120a7b7e355c577c497aaa742c348dcb532a
Author: Julian Eisel
Date: Fri Apr 15 23:39:47 2016 +0200
Branches: temp_widgets_update_tagging
https://developer.blender.org/rBa7cb120a7b7e355c577c497aaa742c348dcb532a
Fix some missing updates
===================================================================
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/windowmanager/widgets/intern/wm_widgetmap.c
===================================================================
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 62d7b7a..2341cdf 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -961,6 +961,7 @@ static void view3d_main_region_listener(bScreen *sc, ScrArea *sa, ARegion *ar, w
case ND_DATA:
case ND_VERTEX_GROUP:
case ND_SELECT:
+ WM_widgetmap_tag_refresh(wmap);
ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/windowmanager/widgets/intern/wm_widgetmap.c b/source/blender/windowmanager/widgets/intern/wm_widgetmap.c
index a79e371..acd1552 100644
--- a/source/blender/windowmanager/widgets/intern/wm_widgetmap.c
+++ b/source/blender/windowmanager/widgets/intern/wm_widgetmap.c
@@ -183,6 +183,12 @@ void WM_widgetmap_widgets_update(const bContext *C, wmWidgetMap *wmap)
if (!wmap || BLI_listbase_is_empty(&wmap->widgetgroups))
return;
+ /* only active widget needs updating */
+ if (wmap->wmap_context.active_widget) {
+ wm_widget_calculate_scale(wmap->wmap_context.active_widget, C);
+ goto done;
+ }
+
for (wmWidgetGroup *wgroup = wmap->widgetgroups.first; wgroup; wgroup = wgroup->next) {
if (wgroup->type->poll && !wgroup->type->poll(C, wgroup->type))
continue;
@@ -209,6 +215,8 @@ void WM_widgetmap_widgets_update(const bContext *C, wmWidgetMap *wmap)
}
}
+
+done:
/* done updating */
wmap->update_flag = 0;
}
More information about the Bf-blender-cvs
mailing list