Merge pull request #27008 from qarmin/fix_toggle_visibility

Fix crash when toggle visibility in SceneTreeDialog
This commit is contained in:
Rémi Verschelde 2019-04-05 16:12:27 +02:00 committed by GitHub
commit 696be49728
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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());
}
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"))
p_node->connect("script_changed", this, "_node_script_changed", varray(p_node));