Skip to content

Commit

Permalink
AccountSettings: only expand root elements on single click.
Browse files Browse the repository at this point in the history
Also, toggle expanding on single click for root elements.
  • Loading branch information
Klaas Freitag committed Sep 25, 2015
1 parent a1421ff commit b72e2b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit b72e2b1

Please sign in to comment.