Manager: Implement double-clicking a VM entry to start a VM
(and on Windows, bringing it to front if already running)
This commit is contained in:
@@ -123,6 +123,8 @@ VMManagerMain::VMManagerMain(QWidget *parent) :
|
|||||||
ui->listView->setCurrentIndex(first_index);
|
ui->listView->setCurrentIndex(first_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connect(ui->listView, &QListView::doubleClicked, this, &VMManagerMain::startButtonPressed);
|
||||||
|
|
||||||
// Load and apply settings
|
// Load and apply settings
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
|
|||||||
@@ -408,6 +408,15 @@ VMManagerSystem::launchMainProcess() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// If the system is already running, bring it to front
|
||||||
|
if (process->processId() != 0) {
|
||||||
|
#ifdef Q_OS_WINDOWS
|
||||||
|
if (this->id) {
|
||||||
|
SetForegroundWindow((HWND)this->id);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
setProcessEnvVars();
|
setProcessEnvVars();
|
||||||
QString program = main_binary.filePath();
|
QString program = main_binary.filePath();
|
||||||
QStringList args;
|
QStringList args;
|
||||||
|
|||||||
Reference in New Issue
Block a user