diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-03-08 23:58:20 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-03-09 00:52:32 +0300 |
commit | aa49444c291fd54e5e45576a28d36d72816a5469 (patch) | |
tree | 6bb4b2232665764845f6d6003356dedb25cdd0e6 /source/blender/editors/screen/workspace_edit.c | |
parent | 2ada9c5bc8fae90315ad79d05a68c8ddf09cb5c8 (diff) |
Fix crash when deleting workspaces too fast
Delete workspaces via the menu was not refreshing the workspace tabs
drawing. This way if you deleted the non-active workspace with the "e" shortcut
from the workspace tab context menu and clicked on the workspace tabs again, it
would crash.
A few notes:
* Deleting a non-active workspace is changing which workspace is then active,
which is really strange.
* Even when deleting the active workspace which workspace then becomes active
seems random.
* Using notifiers (ND_WORKSPACE_DELETE) to delete the workspace seems rather
abusing notifiers in my humble opinion.
This is not an important bugfix anyways, people probably would rarely
run into this. I just ran into it while investigating another bug.
Diffstat (limited to 'source/blender/editors/screen/workspace_edit.c')
-rw-r--r-- | source/blender/editors/screen/workspace_edit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index b442f718aa1..b63a755368e 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -301,6 +301,7 @@ static int workspace_delete_exec(bContext *C, wmOperator *UNUSED(op)) { WorkSpace *workspace = workspace_context_get(C); WM_event_add_notifier(C, NC_SCREEN | ND_WORKSPACE_DELETE, workspace); + WM_event_add_notifier(C, NC_WINDOW, NULL); return OPERATOR_FINISHED; } |