Make tabcompletion key configurable via shortcuts. fixes 1018
[quassel.git] / src / client / treemodel.cpp
index cc1b08a..6ab70e6 100644 (file)
@@ -127,6 +127,10 @@ void AbstractTreeItem::customEvent(QEvent *event) {
   if(childRow == -1)
     return;
 
+  // since we are called asynchronously we have to recheck if the item in question still has no childs
+  if(removeEvent->child()->childCount())
+    return;
+
   removeChild(childRow);
 }