From 93341e206cb5af05a1f6e00d392d8d34a71c1369 Mon Sep 17 00:00:00 2001 From: Vadim Peretokin Date: Wed, 31 May 2017 07:12:04 +0200 Subject: [PATCH] Fix theme loading A theme won't get loaded if no fallback themePath_ is supplied even if it's loaded into the themeMap already. The fallback should only matter when a theme wasn't actually found. --- edbee-lib/edbee/views/texttheme.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edbee-lib/edbee/views/texttheme.cpp b/edbee-lib/edbee/views/texttheme.cpp index ad71ac3..d1846b2 100644 --- a/edbee-lib/edbee/views/texttheme.cpp +++ b/edbee-lib/edbee/views/texttheme.cpp @@ -405,9 +405,9 @@ TextTheme* TextThemeManager::readThemeFile( const QString& fileName, const QStri /// @return the theme with the given name TextTheme* TextThemeManager::theme(const QString& name) { - if( name.isEmpty() || themePath_.isEmpty() ) { return 0; } + if( name.isEmpty() ) { return 0; } TextTheme* theme=themeMap_.value(name); - if( !theme ) { + if( !theme && !themePath_.isEmpty()) { QString filename = QString("%1/%2.tmTheme").arg(themePath_).arg(name); TextTheme* theme = readThemeFile( filename ); if( !theme ) {