projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
791c550
)
Account Settings: Hide the add folder button when Theme::singleSyncFolder is set
author
Olivier Goffart
<ogoffart@woboq.com>
Wed, 19 Aug 2015 15:59:39 +0000
(17:59 +0200)
committer
Olivier Goffart
<ogoffart@woboq.com>
Wed, 19 Aug 2015 16:00:11 +0000
(18:00 +0200)
src/gui/folderstatusmodel.cpp
patch
|
blob
|
history
diff --git
a/src/gui/folderstatusmodel.cpp
b/src/gui/folderstatusmodel.cpp
index cf4b4933af4578c68dc74c07dbcb1315be32147b..5435d61e9ddd6c318dd1aeba1f59555bc3084fde 100644
(file)
--- a/
src/gui/folderstatusmodel.cpp
+++ b/
src/gui/folderstatusmodel.cpp
@@
-286,7
+286,11
@@
int FolderStatusModel::columnCount(const QModelIndex&) const
int FolderStatusModel::rowCount(const QModelIndex& parent) const
{
if (!parent.isValid()) {
- return _folders.count() + 1;
+ if( Theme::instance()->singleSyncFolder() && _folders.count() != 0) {
+ // "Add folder" button not visible in the singleSyncFolder configuration.
+ return _folders.count();
+ }
+ return _folders.count() + 1; // +1 for the "add folder" button
}
auto info = infoForIndex(parent);
if (!info)