From 5300e817c22ea8c86fe087fa382b4abe1aa92aeb Mon Sep 17 00:00:00 2001 From: emeric Date: Wed, 13 May 2020 14:02:21 +0200 Subject: [PATCH] Mitigate the nasty theme switch --- src/lms/ui/LmsTheme.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lms/ui/LmsTheme.cpp b/src/lms/ui/LmsTheme.cpp index 611c0e66..6c6c97a2 100644 --- a/src/lms/ui/LmsTheme.cpp +++ b/src/lms/ui/LmsTheme.cpp @@ -34,6 +34,9 @@ LmsTheme::LmsTheme(Database::User::UITheme theme) void LmsTheme::setTheme(Database::User::UITheme theme) { + if (theme == _theme) + return; + // Hack, use the application interface directly since changing theme is not allowed const auto currentStyleSheets {getStyleSheets(_theme)}; for (auto it {std::crbegin(currentStyleSheets)}; it != std::crend(currentStyleSheets); ++it)