From: Christian Kamm Date: Wed, 20 Jan 2016 11:41:52 +0000 (+0100) Subject: AccountSettings: Auto-expand only single folders #4283 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1384 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f705c56cb33efbd5ed9ee6fe1744dfa224351ff2;p=nextcloud-desktop.git AccountSettings: Auto-expand only single folders #4283 --- diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index fe467ebc8..837c0d05f 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -695,7 +695,11 @@ bool AccountSettings::event(QEvent* e) _quotaInfo.setActive(isVisible()); } if (e->type() == QEvent::Show) { - ui->_folderList->setExpanded(_model->index(0, 0), true); + // Expand the folder automatically only if there's only one, see #4283 + // The 2 is 1 folder + 1 'add folder' button + if (_model->rowCount() <= 2) { + ui->_folderList->setExpanded(_model->index(0, 0), true); + } } return QWidget::event(e); }