Fixup OSX system session file loading request

This commit is contained in:
brunoherbelin
2020-11-03 17:56:18 +01:00
parent bab0e9b710
commit 34580ab5ea
3 changed files with 4 additions and 7 deletions

View File

@@ -112,9 +112,7 @@ Mixer::Mixer() : session_(nullptr), back_session_(nullptr), current_view_(nullpt
current_source_index_ = -1;
// auto load if Settings ask to
if ( !Settings::application.argument_file.empty())
load( Settings::application.argument_file );
else if ( Settings::application.recentSessions.load_at_start &&
if ( Settings::application.recentSessions.load_at_start &&
Settings::application.recentSessions.front_is_valid &&
Settings::application.recentSessions.filenames.size() > 0 &&
Settings::application.fresh_start)

View File

@@ -168,7 +168,6 @@ struct Application
// Verification
std::string name;
std::string executable;
std::string argument_file;
// Global settings Application interface
float scale;
@@ -209,7 +208,7 @@ struct Application
History recentFolders;
History recentImport;
Application() : fresh_start(false), name(APP_NAME), executable(""), argument_file("") {
Application() : fresh_start(false), name(APP_NAME), executable(APP_NAME) {
scale = 1.f;
accent_color = 0;
pannel_stick = false;

View File

@@ -34,7 +34,7 @@
#if defined(APPLE)
extern "C"{
void forward_load_message(const char * filename){
Settings::application.argument_file = std::string(filename);
Mixer::manager().load(filename);
}
}
#endif
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
Settings::Save();
else {
// try to open the file
Settings::application.argument_file = argument;
Mixer::manager().load(argument);
}
}