diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-31 07:35:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-31 07:35:10 +0300 |
commit | 39e1518d413a1af35b39a695b6a2e2d69fd2d35b (patch) | |
tree | fd6216343617c4ec09312dfe261abc80e9c9060a /source/blender/blenkernel/intern/blendfile.c | |
parent | 3b15ff3fb4d4959ee801e8c4f5dac02e0fe05c8a (diff) |
Fix glitch updating manipulator after undo
Running undo would notify manipulators to refresh,
but this still allowed for events in the queue to be handled,
where manipulators could be drawn for selection before
their refresh callback runs.
This made Python manipulators raise exceptions
about referencing invalid data (or crash).
Now tag manipulator update on file load (including undo)
and ensure the refresh callback runs
before drawing manipulator selection.
Also split manipulator map refresh flag in two since selection doesn't
perform the same operations as regular drawing.
Diffstat (limited to 'source/blender/blenkernel/intern/blendfile.c')
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 4de2433a89a..09760fcc4cb 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -218,6 +218,13 @@ static void setup_app_data( BKE_screen_view3d_scene_sync(curscreen, curscene); } } + + /* We need to tag this here because events may be handled immediately after. + * only the current screen is important because we wont have to handle + * events from multiple screens at once.*/ + { + BKE_screen_manipulator_tag_refresh(curscreen); + } } /* free G.main Main database */ |