From ce11be3417a1e916f6b19808e67dc6f0da5d1e98 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Thu, 21 Apr 2022 14:28:47 -0700 Subject: [PATCH] refresh cluster list when reopening GUI --- gui/window.cpp | 8 +++++++- gui/window.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gui/window.cpp b/gui/window.cpp index 6fc3b82906..9f052e45bc 100644 --- a/gui/window.cpp +++ b/gui/window.cpp @@ -224,12 +224,18 @@ void Window::createActions() connect(minimizeAction, &QAction::triggered, this, &QWidget::hide); restoreAction = new QAction(tr("&Restore"), this); - connect(restoreAction, &QAction::triggered, this, &QWidget::showNormal); + connect(restoreAction, &QAction::triggered, this, &Window::restoreWindow); quitAction = new QAction(tr("&Quit"), this); connect(quitAction, &QAction::triggered, qApp, &QCoreApplication::quit); } +void Window::restoreWindow() +{ + QWidget::showNormal(); + updateClusters(); +} + static QString minikubePath() { QString program = QStandardPaths::findExecutable("minikube"); diff --git a/gui/window.h b/gui/window.h index f4ea230644..ddfa956ef8 100644 --- a/gui/window.h +++ b/gui/window.h @@ -174,6 +174,7 @@ private: QLabel *createLabel(QString title, QString text, QFormLayout *form, bool isLink); void checkForMinikube(); + void restoreWindow(); QProcessEnvironment setMacEnv(); QStackedWidget *stackedWidget; bool isBasicView;