Only clean the Not Synced list for the current account #3171
authorJocelyn Turcotte <jturcotte@woboq.com>
Thu, 7 Jan 2016 15:14:12 +0000 (16:14 +0100)
committerJocelyn Turcotte <jturcotte@woboq.com>
Thu, 7 Jan 2016 15:14:18 +0000 (16:14 +0100)
src/gui/protocolwidget.cpp

index 557856023d89dd2c80c4c09006763e018fbe83c5..5c687fda88f979892ea1f57acf67f39d343d609d 100644 (file)
@@ -138,7 +138,14 @@ void ProtocolWidget::cleanItems(const QString& folder)
 
     // The issue list is a state, clear it and let the next sync fill it
     // with ignored files and propagation errors.
-    _issueItemView->clear();
+    itemCnt = _issueItemView->topLevelItemCount();
+    for( int cnt = itemCnt-1; cnt >=0 ; cnt-- ) {
+        QTreeWidgetItem *item = _issueItemView->topLevelItem(cnt);
+        QString itemFolder = item->data(2, Qt::UserRole).toString();
+        if( itemFolder == folder ) {
+            delete item;
+        }
+    }
 }
 
 QString ProtocolWidget::timeString(QDateTime dt, QLocale::FormatType format) const