Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2019-02-28 10:15:46 +0300
committerKevin Ottens <kevin.ottens@nextcloud.com>2020-12-15 12:58:42 +0300
commita72bf8977920858207078ac61664862700632839 (patch)
tree44a8e78c07d6824fa05114e69013e27d0829ceeb /src/gui/accountsettings.cpp
parent2e11f14a6bfac32c25e305f65ac68a659cf01abb (diff)
Selective sync: Don't collapse tree when entering mode #7055
doExpand() is called when the selective sync editing mode is enabled in the folder settings view. Previously it'd set the expansion to be exactly the root items. Now, it just expands any root items that are currently collapsed, leaving all other item expansion unchanged.
Diffstat (limited to 'src/gui/accountsettings.cpp')
-rw-r--r--src/gui/accountsettings.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index c8e767044..a409b613c 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -261,7 +261,12 @@ void AccountSettings::slotToggleSignInState()
void AccountSettings::doExpand()
{
- _ui->_folderList->expandToDepth(0);
+ // Make sure at least the root items are expanded
+ for (int i = 0; i < _model->rowCount(); ++i) {
+ auto idx = _model->index(i);
+ if (!_ui->_folderList->isExpanded(idx))
+ _ui->_folderList->setExpanded(idx, true);
+ }
}
void AccountSettings::slotShowMnemonic(const QString &mnemonic) {