[Pkg-owncloud-commits] [owncloud-client] 164/218: AccountSettings: only expand root elements on single click.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 17 14:31:04 UTC 2015
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 b72e2b146d91ed6025277044d834838983e789ce
Author: Klaas Freitag <freitag at owncloud.com>
Date: Fri Sep 25 13:57:44 2015 +0200
AccountSettings: only expand root elements on single click.
Also, toggle expanding on single click for root elements.
---
src/gui/accountsettings.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index 5210dca..ba416e2 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -135,8 +135,10 @@ void AccountSettings::doExpand()
void AccountSettings::slotFolderListClicked( const QModelIndex& indx )
{
- if( _accountState && _accountState->state() == AccountState::Connected ) {
- ui->_folderList->expand(indx);
+ if( _model->classify(indx) == FolderStatusModel::RootFolder &&
+ _accountState && _accountState->state() == AccountState::Connected ) {
+ bool expanded = ! (ui->_folderList->isExpanded(indx));
+ ui->_folderList->setExpanded(indx, expanded);
}
}
--
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