diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2021-01-29 08:48:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-29 08:48:01 +0100 |
| commit | 8606bf70c76252e20f888264bfbdedde0f1c8754 (patch) | |
| tree | ac827454e054eb3aceaa139562ef3dd27ca94d55 /src/moapplication.cpp | |
| parent | 136dc17e011deda53f6e82e6c8b23ee701be3158 (diff) | |
| parent | a88d3436cc6b2c24ab05400a5ad5e9e67cb95db8 (diff) | |
Merge pull request #1384 from Holt59/add-pick-argument
Implement --pick argument.
Diffstat (limited to 'src/moapplication.cpp')
| -rw-r--r-- | src/moapplication.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/moapplication.cpp b/src/moapplication.cpp index 19b43d77..6d21745e 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<Instance> MOApplication::getCurrentInstance()
+std::unique_ptr<Instance> 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();
|
