Commit: 9fc5a0c95eb9f68cb63fbdc8cf6451c152dcb820
Author: Campbell Barton
Date:   Tue May 22 09:41:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB9fc5a0c95eb9f68cb63fbdc8cf6451c152dcb820

Fix area tool getting out of sync w/ active tool

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

M       source/blender/windowmanager/intern/wm_toolsystem.c

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

diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c 
b/source/blender/windowmanager/intern/wm_toolsystem.c
index 3ef5882bc03..2c81d28e61f 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -57,6 +57,8 @@ static void toolsystem_reinit_with_toolref(
         bContext *C, WorkSpace *UNUSED(workspace), bToolRef *tref);
 static void toolsystem_reinit_ensure_toolref(
         bContext *C, WorkSpace *workspace, const bToolKey *tkey, const char 
*default_tool);
+static void toolsystem_refresh_screen_from_active_tool(
+        Main *bmain, WorkSpace *workspace, bToolRef *tref);
 
 /* -------------------------------------------------------------------- */
 /** \name Tool Reference API
@@ -278,6 +280,8 @@ void WM_toolsystem_ref_set_from_runtime(
         struct bContext *C, struct WorkSpace *workspace, bToolRef *tref,
         const bToolRef_Runtime *tref_rt, const char *idname)
 {
+       Main *bmain = CTX_data_main(C);
+       
        if (tref->runtime) {
                toolsystem_unlink_ref(C, workspace, tref);
        }
@@ -298,7 +302,8 @@ void WM_toolsystem_ref_set_from_runtime(
 
        toolsystem_ref_link(C, workspace, tref);
 
-       /* TODO(campbell): fix message. */
+       toolsystem_refresh_screen_from_active_tool(bmain, workspace, tref);
+
        {
                struct wmMsgBus *mbus = CTX_wm_message_bus(C);
                WM_msg_publish_rna_prop(

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to