diff --git a/lib/external/libromfs b/lib/external/libromfs index 59d8ceccb..beec45afc 160000 --- a/lib/external/libromfs +++ b/lib/external/libromfs @@ -1 +1 @@ -Subproject commit 59d8ceccb0b668e16a5d2b25c457514c9e8c1493 +Subproject commit beec45afc942209cc34d30f99eac42b2bb04aa79 diff --git a/lib/libimhex/include/hex/api/theme_manager.hpp b/lib/libimhex/include/hex/api/theme_manager.hpp index 438f24e5a..832803fbe 100644 --- a/lib/libimhex/include/hex/api/theme_manager.hpp +++ b/lib/libimhex/include/hex/api/theme_manager.hpp @@ -24,6 +24,8 @@ namespace hex::api { static const std::string &getThemeImagePostfix(); static std::optional parseColorString(const std::string &colorString); + + static void reset(); private: ThemeManager() = default; diff --git a/lib/libimhex/source/api/theme_manager.cpp b/lib/libimhex/source/api/theme_manager.cpp index 4b6ddbe91..88cf69dd3 100644 --- a/lib/libimhex/source/api/theme_manager.cpp +++ b/lib/libimhex/source/api/theme_manager.cpp @@ -115,4 +115,11 @@ namespace hex::api { return themeNames; } + void ThemeManager::reset() { + ThemeManager::s_themes.clear(); + ThemeManager::s_styleHandlers.clear(); + ThemeManager::s_themeHandlers.clear(); + ThemeManager::s_imagePostfix.clear(); + } + } \ No newline at end of file diff --git a/main/source/init/tasks.cpp b/main/source/init/tasks.cpp index 7d674cc69..780fcccf8 100644 --- a/main/source/init/tasks.cpp +++ b/main/source/init/tasks.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -227,6 +228,8 @@ namespace hex::init { ContentRegistry::FileHandler::getEntries().clear(); ContentRegistry::Hashes::impl::getHashes().clear(); + api::ThemeManager::reset(); + { auto &visualizers = ContentRegistry::HexEditor::impl::getVisualizers(); for (auto &[name, visualizer] : visualizers)