[Pkg-owncloud-commits] [owncloud-client] 14/470: AccountSettings: Auto-expand only single folders #4283
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:24:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit f705c56cb33efbd5ed9ee6fe1744dfa224351ff2
Author: Christian Kamm <mail at ckamm.de>
Date: Wed Jan 20 12:41:52 2016 +0100
AccountSettings: Auto-expand only single folders #4283
---
src/gui/accountsettings.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index fe467eb..837c0d0 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);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list