From 251a7a067b8fdb63c81c827b021c3808379d2f92 Mon Sep 17 00:00:00 2001 From: Marqin Date: Tue, 23 Sep 2014 01:12:44 +0200 Subject: [PATCH 1/5] Fix File->Save As in Script panel --- tools/editor/resources_dock.cpp | 67 ++++++++++----------------------- 1 file changed, 20 insertions(+), 47 deletions(-) diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp index a05fe425b37..495225b91eb 100644 --- a/tools/editor/resources_dock.cpp +++ b/tools/editor/resources_dock.cpp @@ -69,36 +69,8 @@ void ResourcesDock::_tool_selected(int p_tool) { TreeItem *ti = resources->get_selected(); if (!ti) break; - Ref current_res = ti->get_metadata(0); - RES res(current_res); - - List extensions; - ResourceSaver::get_recognized_extensions(res,&extensions); - file->set_mode(FileDialog::MODE_SAVE_FILE); - //not for now? - - if (current_res->get_path()!="" && current_res->get_path().find("::")==-1) { - - file->set_current_path(current_res->get_path()); - } else { - - String existing; - if (extensions.size()) { - existing="new_"+res->get_type().to_lower()+"."+extensions.front()->get().to_lower(); - } - - file->set_current_file(existing); - } - - file->clear_filters(); - for(int i=0;iadd_filter("*."+extensions[i]+" ; "+extensions[i].to_upper()); - } - - //file->set_current_path(current_path); - file->popup_centered_ratio(); + save_resource_as(ti->get_metadata(0)); } break; @@ -174,33 +146,34 @@ void ResourcesDock::save_resource(const String& p_path,const Ref& p_re void ResourcesDock::save_resource_as(const Ref& p_resource) { + current_action=TOOL_SAVE_AS; - add_resource(p_resource); - TreeItem *root=resources->get_root(); - ERR_FAIL_COND(!root); + RES res(p_resource); - TreeItem *existing=root->get_children(); + List extensions; + ResourceSaver::get_recognized_extensions(res,&extensions); + file->set_mode(FileDialog::MODE_SAVE_FILE); - while(existing) { + if (p_resource->get_path()!="" && p_resource->get_path().find("::")==-1) { - Ref r = existing->get_metadata(0); - if (r==p_resource) { - //existing->move_to_top(); - existing->select(0); - resources->ensure_cursor_is_visible(); - return; // existing + file->set_current_path(p_resource->get_path()); + } else { + + String existing; + if (extensions.size()) { + existing="new_"+res->get_type().to_lower()+"."+extensions.front()->get().to_lower(); } - existing=existing->get_next(); + + file->set_current_file(existing); } - ERR_FAIL_COND(!existing); - - existing->select(0); - - _tool_selected(TOOL_SAVE_AS); - + file->clear_filters(); + for(int i=0;iadd_filter("*."+extensions[i]+" ; "+extensions[i].to_upper()); + } + file->popup_centered_ratio(); } From 6deec0c0c2bd64d10da1e4da9dec3fb4a88242dc Mon Sep 17 00:00:00 2001 From: Luke Picciau Date: Wed, 24 Sep 2014 21:07:17 +0930 Subject: [PATCH 2/5] Changed GUI text to better match action --- tools/editor/create_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index 3a6b856247b..43c18341be3 100644 --- a/tools/editor/create_dialog.cpp +++ b/tools/editor/create_dialog.cpp @@ -289,7 +289,7 @@ CreateDialog::CreateDialog() { search_box->connect("input_event",this,"_sbox_input"); search_options = memnew( Tree ); vbc->add_margin_child("Matches:",search_options,true); - get_ok()->set_text("Open"); + get_ok()->set_text("Create"); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); From 27b1f38401489cbb5b84b1900dbc35124bb8852d Mon Sep 17 00:00:00 2001 From: marynate Date: Wed, 8 Oct 2014 11:07:05 +0800 Subject: [PATCH 3/5] Fix travis-ci build config for new build system --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 73b07acb7fd..6dd21dae0b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ before_script: - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi -script: scons bin/godot +script: scons platform=x11 From 1c6dcee4655a356d2b39928f65164c67a18d0660 Mon Sep 17 00:00:00 2001 From: marynate Date: Wed, 8 Oct 2014 14:37:04 +0800 Subject: [PATCH 4/5] Fix android build on windows --- platform/android/SCsub | 2 +- platform/android/detect.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/android/SCsub b/platform/android/SCsub index 3c55b993efa..cffec5ae952 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -66,6 +66,6 @@ for x in env.android_module_libraries: shutil.copy(x,abspath+"/java/libs") -env_android.SharedLibrary("#bin/libgodot_android",[android_objects],SHLIBSUFFIX=env["SHLIBSUFFIX"]) +env_android.SharedLibrary("#bin/libgodot",[android_objects],SHLIBSUFFIX=env["SHLIBSUFFIX"]) #env.Command('#bin/libgodot_android.so', '#platform/android/libgodot_android.so', Copy('bin/libgodot_android.so', 'platform/android/libgodot_android.so')) diff --git a/platform/android/detect.py b/platform/android/detect.py index 062cc62b52d..417f3e68ab1 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -61,6 +61,7 @@ def configure(env): import methods env.Tool('gcc') env['SPAWN'] = methods.win32_spawn + env['SHLIBSUFFIX'] = '.so' # env.android_source_modules.append("../libs/apk_expansion") env.android_source_modules.append("../libs/google_play_services") From 26d399d9858e6cd7a2a28ab75352a2f18a72b11d Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Thu, 23 Oct 2014 18:04:21 +0800 Subject: [PATCH 5/5] Fix Export -> image group panel 1.click group item doe's not refresh group_images 2.Switch to Atlas mode that preview button doe's not shown --- tools/editor/project_export.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index 1da29c5e7bb..a0031ff4567 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -529,6 +529,8 @@ void ProjectExportDialog::_group_selected() { _update_group(); //? + + _update_group_tree(); } String ProjectExportDialog::_get_selected_group() { @@ -738,6 +740,8 @@ void ProjectExportDialog::_group_changed(Variant v) { EditorNode::get_undo_redo()->add_undo_method(this,"_save_export_cfg"); EditorNode::get_undo_redo()->commit_action(); updating=false; + // update atlas preview button + _update_group(); } void ProjectExportDialog::_group_item_edited() {