Skip to content

Commit

Permalink
Running auto save on by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Dec 6, 2016
1 parent 31b822e commit 7d2bf73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/SetupDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private slots:

bool m_smoothScroll;
bool m_disableAutoSave;
bool m_runningAutoSave;
bool m_disableRunningAutoSave;
int m_saveInterval;
QSlider * m_saveIntervalSlider;
QLabel * m_saveIntervalLbl;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ void MainWindow::browseHelp()

void MainWindow::autoSave()
{
if( ( ConfigManager::inst()->value( "ui", "runningautosave" ).toInt() ||
if( ( !ConfigManager::inst()->value( "ui", "disablerunningautosave" ).toInt() ||
! Engine::getSong()->isPlaying() ) &&
!( Engine::getSong()->isExporting() ||
QApplication::mouseButtons() ) )
Expand Down
10 changes: 5 additions & 5 deletions src/gui/SetupDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
m_backgroundArtwork( QDir::toNativeSeparators( ConfigManager::inst()->backgroundArtwork() ) ),
m_smoothScroll( ConfigManager::inst()->value( "ui", "smoothscroll" ).toInt() ),
m_disableAutoSave( !ConfigManager::inst()->value( "ui", "disableautosave" ).toInt() ),
m_runningAutoSave( ConfigManager::inst()->value( "ui", "runningautosave" ).toInt() ),
m_disableRunningAutoSave( !ConfigManager::inst()->value( "ui", "disablerunningautosave" ).toInt() ),
m_saveInterval( ConfigManager::inst()->value( "ui", "saveinterval" ).toInt() < 1 ?
MainWindow::DEFAULT_SAVE_INTERVAL_MINUTES :
ConfigManager::inst()->value( "ui", "saveinterval" ).toInt() ),
Expand Down Expand Up @@ -674,7 +674,7 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
LedCheckBox * runningAutoSave = new LedCheckBox(
tr( "Allow auto save while playing" ), auto_save_tw );
runningAutoSave->move( 10, 90 );
runningAutoSave->setChecked( m_runningAutoSave );
runningAutoSave->setChecked( m_disableRunningAutoSave );
connect( runningAutoSave, SIGNAL( toggled( bool ) ),
this, SLOT( toggleRunningAutoSave( bool ) ) );

Expand Down Expand Up @@ -1029,8 +1029,8 @@ void SetupDialog::accept()
QString::number( !m_disableAutoSave ) );
ConfigManager::inst()->setValue( "ui", "saveinterval",
QString::number( m_saveInterval ) );
ConfigManager::inst()->setValue( "ui", "runningautosave",
QString::number( m_runningAutoSave ) );
ConfigManager::inst()->setValue( "ui", "disablerunningautosave",
QString::number( !m_disableRunningAutoSave ) );
ConfigManager::inst()->setValue( "ui", "oneinstrumenttrackwindow",
QString::number( m_oneInstrumentTrackWindow ) );
ConfigManager::inst()->setValue( "ui", "compacttrackbuttons",
Expand Down Expand Up @@ -1221,7 +1221,7 @@ void SetupDialog::toggleAutoSave( bool _enabled )

void SetupDialog::toggleRunningAutoSave( bool _enabled )
{
m_runningAutoSave = _enabled;
m_disableRunningAutoSave = _enabled;
}


Expand Down

0 comments on commit 7d2bf73

Please sign in to comment.