SelectiveSync: Show Apply/Cancel less
authorChristian Kamm <mail@ckamm.de>
Tue, 24 Nov 2015 12:00:05 +0000 (13:00 +0100)
committerChristian Kamm <mail@ckamm.de>
Tue, 24 Nov 2015 12:01:10 +0000 (13:01 +0100)
Before the selective sync status text and apply/cancel buttons
were shown as soon as any folder was expanded. This changes it
to only show when the model is dirty (or a big folder confirmation
is needed).

This is nice because we auto-open the folder list sometimes
and having the apply/cancel buttons visible makes users think a
decision is needed.

src/gui/accountsettings.cpp

index 2bb7206debd02cce7bef52744a2941631488338f..3abb78b1b897bedffbc373f1eb6f6874ca0006f1 100644 (file)
@@ -606,12 +606,6 @@ AccountSettings::~AccountSettings()
 void AccountSettings::refreshSelectiveSyncStatus()
 {
     bool shouldBeVisible = _model->isDirty();
-    for (int i = 0; !shouldBeVisible && i < _model->rowCount(); ++i) {
-        auto index = _model->index(i);
-        if (ui->_folderList->isExpanded(index) && _model->rowCount(index) > 0) {
-            shouldBeVisible = true;
-        }
-    }
 
     QString msg;
     int cnt = 0;