Skip to content

Commit

Permalink
Fix theme loading
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vadi2 committed May 31, 2017
1 parent 67385cb commit 93341e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edbee-lib/edbee/views/texttheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 93341e2

Please sign in to comment.