Fix main scene not being saved when set via Play button

Fixes #1134 for real. Also tweaked the engine.cfg template
and the preference order when browsing for the main scene.
This commit is contained in:
Rémi Verschelde 2016-07-19 21:35:14 +02:00
parent 525fb01fd2
commit 87d0515d09
3 changed files with 6 additions and 3 deletions

View File

@ -1429,7 +1429,7 @@ Globals::Globals() {
set("application/name","" );
set("application/main_scene","");
custom_prop_info["application/main_scene"]=PropertyInfo(Variant::STRING,"application/main_scene",PROPERTY_HINT_FILE,"scn,res,xscn,xml,tscn");
custom_prop_info["application/main_scene"]=PropertyInfo(Variant::STRING,"application/main_scene",PROPERTY_HINT_FILE,"tscn,scn,xscn,xml,res");
set("application/disable_stdout",false);
set("application/use_shared_user_dir",true);

View File

@ -1175,6 +1175,8 @@ void EditorNode::_dialog_action(String p_file) {
case SETTINGS_PICK_MAIN_SCENE: {
Globals::get_singleton()->set("application/main_scene",p_file);
Globals::get_singleton()->set_persisting("application/main_scene",true);
Globals::get_singleton()->save();
//would be nice to show the project manager opened with the hilighted field..
} break;
case FILE_SAVE_OPTIMIZED: {

View File

@ -203,14 +203,15 @@ private:
} else {
f->store_line("; Engine configuration file.");
f->store_line("; It's best to edit using the editor UI, not directly,");
f->store_line("; becausethe parameters that go here are not obvious.");
f->store_line("; It's best edited using the editor UI and not directly,");
f->store_line("; since the parameters that go here are not all obvious.");
f->store_line("; ");
f->store_line("; Format: ");
f->store_line("; [section] ; section goes between []");
f->store_line("; param=value ; assign values to parameters");
f->store_line("\n");
f->store_line("[application]");
f->store_line("\n");
f->store_line("name=\""+project_name->get_text()+"\"");
f->store_line("icon=\"res://icon.png\"");