diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index d0c229d71..59bb8ccd7 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -884,6 +884,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow view = new InstancesView(ui->centralWidget, APPLICATION->instances().get()); connect(view, &InstancesView::showContextMenu, this, &MainWindow::showInstanceContextMenu); + connect(view, &InstancesView::refreshInstances, this, &MainWindow::refreshInstances); connect(filterView, &QLineEdit::textEdited, view, &InstancesView::setFilterQuery); ui->verticalLayout->addWidget(view); diff --git a/launcher/ui/instanceview/InstancesView.cpp b/launcher/ui/instanceview/InstancesView.cpp index 3016a221c..eb4650184 100644 --- a/launcher/ui/instanceview/InstancesView.cpp +++ b/launcher/ui/instanceview/InstancesView.cpp @@ -181,6 +181,9 @@ bool InstancesView::eventFilter(QObject* obj, QEvent* event) case Qt::Key_Enter: activateInstance(currentView()->selectionModel()->currentIndex()); return true; + case Qt::Key_F5: + emit refreshInstances(); + return true; } } return QObject::eventFilter(obj, event); diff --git a/launcher/ui/instanceview/InstancesView.h b/launcher/ui/instanceview/InstancesView.h index cfa3a10ef..dfcc85945 100644 --- a/launcher/ui/instanceview/InstancesView.h +++ b/launcher/ui/instanceview/InstancesView.h @@ -59,6 +59,7 @@ class InstancesView : public QStackedWidget { void instanceActivated(InstancePtr inst); void currentInstanceChanged(InstancePtr current, InstancePtr previous); void showContextMenu(const QPoint pos, InstancePtr inst); + void refreshInstances(); private slots: void activateInstance(const QModelIndex& index);