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.
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;