Commit: d216a0b505735da432448c438982b5cac1cba9ee
Author: Julian Eisel
Date: Fri Apr 10 17:28:26 2020 +0200
Branches: master
https://developer.blender.org/rBd216a0b505735da432448c438982b5cac1cba9ee
Fix T75489: Crash on deleting current workspace from the outliner
It should not be possible to delete the current workspace from the
outliner. Show an error message instead.
===================================================================
M source/blender/editors/space_outliner/outliner_edit.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_edit.c
b/source/blender/editors/space_outliner/outliner_edit.c
index 60e6b423720..3ae100b6209 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -54,6 +54,7 @@
#include "BKE_outliner_treehash.h"
#include "BKE_report.h"
#include "BKE_scene.h"
+#include "BKE_workspace.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
@@ -473,6 +474,14 @@ static void id_delete(bContext *C, ReportList *reports,
TreeElement *te, TreeSto
id->name);
return;
}
+ else if (te->idcode == ID_WS) {
+ BKE_workspace_id_tag_all_visible(bmain, LIB_TAG_DOIT);
+ if (id->tag & LIB_TAG_DOIT) {
+ BKE_reportf(
+ reports, RPT_WARNING, "Cannot delete currently visible workspace id
'%s'", id->name);
+ return;
+ }
+ }
BKE_id_delete(bmain, id);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs