Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-14 09:44:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-14 10:05:02 +0300
commit153c144053cc1e51ca2564e8ac61271ab39d6716 (patch)
tree29e8a2850b9383b224d31b188f300d0d64b0dd2c /source/blender/windowmanager
parent1f891bbc2c329f06ca3f89ebc659a1919cc5185f (diff)
Fix T64339: Crash with UV sculpt after undo
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_toolsystem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c
index f429415bee9..773f02e2591 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -549,6 +549,7 @@ bool WM_toolsystem_key_from_context(ViewLayer *view_layer, ScrArea *sa, bToolKey
void WM_toolsystem_refresh_active(bContext *C)
{
Main *bmain = CTX_data_main(C);
+ BKE_main_id_tag_idcode(bmain, ID_WS, LIB_TAG_DOIT, false);
for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
for (wmWindow *win = wm->windows.first; win; win = win->next) {
WorkSpace *workspace = WM_window_get_active_workspace(win);
@@ -572,6 +573,14 @@ void WM_toolsystem_refresh_active(bContext *C)
}
}
}
+
+ if ((workspace->id.tag & LIB_TAG_DOIT) == 0) {
+ workspace->id.tag |= LIB_TAG_DOIT;
+ /* Refresh to ensure data is initialized, see: T64339. */
+ for (bToolRef *tref = workspace->tools.first; tref; tref = tref->next) {
+ toolsystem_refresh_ref(C, workspace, tref);
+ }
+ }
}
}
}