mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #3458 from TheHX/pr-issue-3457
Fix crash when renaming nodes using focus loss
This commit is contained in:
commit
62a574dad9
@ -658,6 +658,9 @@ void SceneTreeEditor::_renamed() {
|
|||||||
new_name=n->get_name();
|
new_name=n->get_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (new_name==n->get_name())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!undo_redo) {
|
if (!undo_redo) {
|
||||||
n->set_name( new_name );
|
n->set_name( new_name );
|
||||||
which->set_metadata(0,n->get_path());
|
which->set_metadata(0,n->get_path());
|
||||||
@ -844,7 +847,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open
|
|||||||
add_child( tree );
|
add_child( tree );
|
||||||
|
|
||||||
tree->connect("cell_selected", this,"_selected_changed");
|
tree->connect("cell_selected", this,"_selected_changed");
|
||||||
tree->connect("item_edited", this,"_renamed");
|
tree->connect("item_edited", this,"_renamed",varray(),CONNECT_DEFERRED);
|
||||||
tree->connect("multi_selected",this,"_cell_multi_selected");
|
tree->connect("multi_selected",this,"_cell_multi_selected");
|
||||||
tree->connect("button_pressed",this,"_cell_button_pressed");
|
tree->connect("button_pressed",this,"_cell_button_pressed");
|
||||||
// tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true);
|
// tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true);
|
||||||
|
Loading…
Reference in New Issue
Block a user