Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/ConfigManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ class EXPORT ConfigManager

const QString & value( const QString & cls,
const QString & attribute ) const;
const QString & value( const QString & cls,
const QString & attribute,
const QString & defaultVal ) const;
void setValue( const QString & cls, const QString & attribute,
const QString & value );
void deleteValue( const QString & cls, const QString & attribute);
Expand Down
10 changes: 10 additions & 0 deletions src/core/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,16 @@ const QString & ConfigManager::value( const QString & cls,



const QString & ConfigManager::value( const QString & cls,
const QString & attribute,
const QString & defaultVal ) const
{
const QString & val = value( cls, attribute );
return val.isEmpty() ? defaultVal : val;
}




void ConfigManager::setValue( const QString & cls,
const QString & attribute,
Expand Down
6 changes: 3 additions & 3 deletions src/gui/SetupDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
#endif
m_backgroundArtwork( QDir::toNativeSeparators( ConfigManager::inst()->backgroundArtwork() ) ),
m_smoothScroll( ConfigManager::inst()->value( "ui", "smoothscroll" ).toInt() ),
m_enableAutoSave( ConfigManager::inst()->value( "ui", "enableautosave" ).toInt() ),
m_enableRunningAutoSave( ConfigManager::inst()->value( "ui", "enablerunningautosave" ).toInt() ),
m_enableAutoSave( ConfigManager::inst()->value( "ui", "enableautosave", "1" ).toInt() ),
m_enableRunningAutoSave( ConfigManager::inst()->value( "ui", "enablerunningautosave", "1" ).toInt() ),
m_saveInterval( ConfigManager::inst()->value( "ui", "saveinterval" ).toInt() < 1 ?
MainWindow::DEFAULT_SAVE_INTERVAL_MINUTES :
ConfigManager::inst()->value( "ui", "saveinterval" ).toInt() ),
Expand All @@ -131,7 +131,7 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
m_syncVSTPlugins( ConfigManager::inst()->value( "ui",
"syncvstplugins" ).toInt() ),
m_animateAFP(ConfigManager::inst()->value( "ui",
"animateafp").toInt() ),
"animateafp", "1" ).toInt() ),
m_printNoteLabels(ConfigManager::inst()->value( "ui",
"printnotelabels").toInt() ),
m_displayWaveform(ConfigManager::inst()->value( "ui",
Expand Down