From e99225ce9445a0f197d54905ace6addcc2035f8e Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Wed, 1 Sep 2021 20:19:11 +0200 Subject: [PATCH] Add Installed list model reset on wizard finish --- ScreenPlay/app.cpp | 2 ++ ScreenPlay/src/create.cpp | 1 + ScreenPlay/src/create.h | 1 + 3 files changed, 4 insertions(+) diff --git a/ScreenPlay/app.cpp b/ScreenPlay/app.cpp index 08800501..3778a349 100644 --- a/ScreenPlay/app.cpp +++ b/ScreenPlay/app.cpp @@ -173,6 +173,8 @@ void App::init() } m_create = make_unique(m_globalVariables); + QObject::connect(m_create.get(), &Create::finished, m_installedListModel.get(), &InstalledListModel::reset); + m_wizards = make_unique(m_globalVariables); // When the installed storage path changed diff --git a/ScreenPlay/src/create.cpp b/ScreenPlay/src/create.cpp index 261666a5..de6b6aed 100644 --- a/ScreenPlay/src/create.cpp +++ b/ScreenPlay/src/create.cpp @@ -237,6 +237,7 @@ void Create::saveWallpaper( } emit createWallpaperStateChanged(ImportVideoState::ImportVideoState::CreateProjectFileFinished); + emit finished(); } /*! diff --git a/ScreenPlay/src/create.h b/ScreenPlay/src/create.h index c8fc1d46..09eb2221 100644 --- a/ScreenPlay/src/create.h +++ b/ScreenPlay/src/create.h @@ -95,6 +95,7 @@ signals: void ffmpegOutputChanged(QString ffmpegOutput); void widgetCreatedSuccessful(QString path); void htmlWallpaperCreatedSuccessful(QString path); + void finished(); public slots: void cancel();