diff options
author | kobewi <kobewi4e@gmail.com> | 2022-08-29 12:10:32 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-11-02 17:51:58 +0100 |
commit | 15831e381bdfc1d086e1d7dca0d501e4c8dcf4d5 (patch) | |
tree | 59910e5dac3361ebb564ea464a0f0f219203221f /editor/editor_locale_dialog.cpp | |
parent | 604abb434f6740935be669dc8152856412d9ca73 (diff) | |
download | redot-engine-15831e381bdfc1d086e1d7dca0d501e4c8dcf4d5.tar.gz |
Unify usage of undo_redo in editor
Diffstat (limited to 'editor/editor_locale_dialog.cpp')
-rw-r--r-- | editor/editor_locale_dialog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp index 106cc61947..a913fb2fd9 100644 --- a/editor/editor_locale_dialog.cpp +++ b/editor/editor_locale_dialog.cpp @@ -141,6 +141,7 @@ void EditorLocaleDialog::_filter_lang_option_changed() { f_lang_all.sort(); + Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Changed Locale Language Filter")); undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/language_filter", f_lang_all); undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/language_filter", prev); @@ -174,6 +175,7 @@ void EditorLocaleDialog::_filter_script_option_changed() { f_script_all.sort(); + Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Changed Locale Script Filter")); undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/script_filter", f_script_all); undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/script_filter", prev); @@ -207,6 +209,7 @@ void EditorLocaleDialog::_filter_cnt_option_changed() { f_cnt_all.sort(); + Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Changed Locale Country Filter")); undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/country_filter", f_cnt_all); undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/country_filter", prev); @@ -221,6 +224,7 @@ void EditorLocaleDialog::_filter_mode_changed(int p_mode) { prev = GLOBAL_GET("internationalization/locale/locale_filter_mode"); } + Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Changed Locale Filter Mode")); undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter_mode", f_mode); undo_redo->add_undo_property(ProjectSettings::get_singleton(), "internationalization/locale/locale_filter_mode", prev); @@ -385,8 +389,6 @@ void EditorLocaleDialog::popup_locale_dialog() { } EditorLocaleDialog::EditorLocaleDialog() { - undo_redo = EditorNode::get_undo_redo(); - set_title(TTR("Select a Locale")); VBoxContainer *vb = memnew(VBoxContainer); |