diff options
author | reduz <reduzio@gmail.com> | 2015-12-28 18:04:22 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2015-12-28 18:04:22 -0300 |
commit | 496cb4977125e45f046a1279876ef829fb22dbf3 (patch) | |
tree | 985845f6b616f57540f65d2fa24df1d3b3e92a74 /tools/editor | |
parent | 110de2ccace05ade4d9fbdded7f4c158dfaa13c1 (diff) |
Fix proper ordering of project settings properties, also fixes inability to change order of autoloads
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/project_settings.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index 132ae5f0da..301ae2ec14 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -930,11 +930,14 @@ void ProjectSettings::_autoload_delete(Object *p_item,int p_column, int p_button String swap_name= "autoload/"+swap->get_text(0); + int order = Globals::get_singleton()->get_order(name); + int swap_order = Globals::get_singleton()->get_order(swap_name); + undo_redo->create_action("Move Autoload"); - undo_redo->add_do_method(Globals::get_singleton(),"set_order",swap_name,Globals::get_singleton()->get_order(name)); - undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,Globals::get_singleton()->get_order(swap_name)); - undo_redo->add_undo_method(Globals::get_singleton(),"set_order",swap_name,Globals::get_singleton()->get_order(swap_name)); - undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,Globals::get_singleton()->get_order(name)); + undo_redo->add_do_method(Globals::get_singleton(),"set_order",swap_name,order); + undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,swap_order); + undo_redo->add_undo_method(Globals::get_singleton(),"set_order",swap_name,swap_order); + undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,order); undo_redo->add_do_method(this,"_update_autoload"); undo_redo->add_undo_method(this,"_update_autoload"); undo_redo->add_do_method(this,"_settings_changed"); |