From a88d3436cc6b2c24ab05400a5ad5e9e67cb95db8 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Thu, 28 Jan 2021 19:05:05 +0100 Subject: Implementation --pick argument. --- src/moapplication.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/moapplication.cpp') diff --git a/src/moapplication.cpp b/src/moapplication.cpp index 91cac2b1..1289b6ba 100644 --- a/src/moapplication.cpp +++ b/src/moapplication.cpp @@ -183,7 +183,7 @@ void MOApplication::firstTimeSetup(MOMultiProcess& multiProcess) Qt::QueuedConnection); } -int MOApplication::setup(MOMultiProcess& multiProcess) +int MOApplication::setup(MOMultiProcess& multiProcess, bool forceSelect) { TimeThis tt("MOApplication setup()"); @@ -192,7 +192,7 @@ int MOApplication::setup(MOMultiProcess& multiProcess) MOBase::details::setPluginDataPath(OrganizerCore::pluginDataPath()); // figuring out the current instance - m_instance = getCurrentInstance(); + m_instance = getCurrentInstance(forceSelect); if (!m_instance) { return 1; } @@ -439,12 +439,12 @@ void MOApplication::externalMessage(const QString& message) } } -std::unique_ptr MOApplication::getCurrentInstance() +std::unique_ptr MOApplication::getCurrentInstance(bool forceSelect) { auto& m = InstanceManager::singleton(); auto currentInstance = m.currentInstance(); - if (!currentInstance) + if (forceSelect || !currentInstance) { // clear any overrides that might have been given on the command line m.clearOverrides(); -- cgit v1.3.1