summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Grzesik <kubecz3k@gmail.com>2017-07-28 10:32:49 +0200
committerJakub Grzesik <kubecz3k@gmail.com>2017-07-28 10:32:49 +0200
commit9a838568b6366902b9fde8a00ab18b438924fb01 (patch)
tree783819b2ab0bef96a62ff0b5d98098ac42f3c0be
parent246b574909f3ae1610001927b773d5b0f2c887e8 (diff)
correct RMB options for instanced inherited scene
When scene is inherited and later instanced as a part of another scene, only options related to instancing will be visible - same behavior as in 2.x closes #9901
-rw-r--r--editor/scene_tree_dock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 57ab931827..47a9185389 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -37,9 +37,9 @@
#include "editor/plugins/spatial_editor_plugin.h"
#include "editor_node.h"
#include "editor_settings.h"
-#include "project_settings.h"
#include "multi_node_edit.h"
#include "os/keyboard.h"
+#include "project_settings.h"
#include "scene/main/viewport.h"
#include "scene/resources/packed_scene.h"
#include "script_editor_debugger.h"
@@ -1885,7 +1885,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
if (is_external) {
bool is_inherited = selection[0]->get_scene_inherited_state() != NULL;
bool is_top_level = selection[0]->get_owner() == NULL;
- if (is_inherited) {
+ if (is_inherited && is_top_level) {
menu->add_separator();
menu->add_item(TTR("Clear Inheritance"), TOOL_SCENE_CLEAR_INHERITANCE);
menu->add_icon_item(get_icon("Load", "EditorIcons"), TTR("Open in Editor"), TOOL_SCENE_OPEN_INHERITED);