mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
Fixup OSX system session file loading request
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
4
main.cpp
4
main.cpp
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user