summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index bfc074ec..bd7f8303 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -277,10 +277,20 @@ void openInstanceManager(PluginContainer& pc, QWidget* parent);
std::optional<Instance> selectInstance()
{
NexusInterface ni(nullptr);
-
PluginContainer pc(nullptr);
pc.loadPlugins();
+ if (InstanceManager::instance().instancePaths().empty()) {
+ // no instances configured
+ CreateInstanceDialog dlg(pc, nullptr);
+ if (dlg.exec() != QDialog::Accepted) {
+ return {};
+ }
+
+ return InstanceManager::instance().currentInstance();
+ }
+
+
InstanceManagerDialog dlg(pc);
dlg.setRestartOnSelect(false);