Fix toggle visibility in SceneTreeDialog

(cherry picked from commit 2bc6ad670b)
This commit is contained in:
qarmin 2019-03-13 11:19:51 +01:00 committed by Rémi Verschelde
parent b439515d73
commit 8f537cfa19
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
item->set_tooltip(0, String(p_node->get_name()) + "\n" + TTR("Type:") + " " + p_node->get_class()); item->set_tooltip(0, String(p_node->get_name()) + "\n" + TTR("Type:") + " " + p_node->get_class());
} }
if (can_open_instance) { if (can_open_instance && undo_redo) { //Show buttons only when necessary(SceneTreeDock) to avoid crashes
if (!p_node->is_connected("script_changed", this, "_node_script_changed")) if (!p_node->is_connected("script_changed", this, "_node_script_changed"))
p_node->connect("script_changed", this, "_node_script_changed", varray(p_node)); p_node->connect("script_changed", this, "_node_script_changed", varray(p_node));