mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-20 21:07:17 +01:00
Set the resource's new name using UndoRedo.
This commit is contained in:
parent
30be9d8e81
commit
e68b2733de
@ -177,10 +177,12 @@ func on_item_edited() -> void:
|
||||
if !name_edited_resource:
|
||||
return
|
||||
|
||||
name_edited_resource.resource_name = item.get_text(0)
|
||||
_undo_redo.create_action("WE: Renamed Entry")
|
||||
_undo_redo.add_do_method(name_edited_resource, "set_name", item.get_text(0))
|
||||
_undo_redo.add_undo_method(name_edited_resource, "set_name", name_edited_resource.resource_name)
|
||||
_undo_redo.commit_action()
|
||||
|
||||
# name_edited_resource.resource_name = item.get_text(0)
|
||||
name_edited_resource.emit_changed()
|
||||
name_edited_resource = null
|
||||
on_resource_changed()
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user