SelectiveSync: Improve menu #4378
authorMarkus Goetz <markus@woboq.com>
Mon, 22 Feb 2016 11:47:26 +0000 (12:47 +0100)
committerMarkus Goetz <markus@woboq.com>
Tue, 23 Feb 2016 10:28:03 +0000 (11:28 +0100)
src/gui/accountsettings.cpp

index 7a016cb0e60bb2e183a797b88c5d115b658aa7ae..fa4018f0cfdb6141e5a2965a0132cd48ac09490a 100644 (file)
@@ -208,9 +208,11 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
     QAction *ac = menu->addAction(tr("Open folder"));
     connect(ac, SIGNAL(triggered(bool)), this, SLOT(slotOpenCurrentFolder()));
 
-    ac = menu->addAction(tr("Choose what to sync"));
-    ac->setEnabled(folderConnected);
-    connect(ac, SIGNAL(triggered(bool)), this, SLOT(doExpand()));
+    if (!ui->_folderList->isExpanded(index)) {
+        ac = menu->addAction(tr("Choose what to sync"));
+        ac->setEnabled(folderConnected);
+        connect(ac, SIGNAL(triggered(bool)), this, SLOT(doExpand()));
+    }
 
     ac = menu->addAction(folderPaused ? tr("Resume sync") : tr("Pause sync"));
     connect(ac, SIGNAL(triggered(bool)), this, SLOT(slotEnableCurrentFolder()));