fixed a bug in the networkmodel
authorMarcus Eggenberger <egs@quassel-irc.org>
Fri, 11 Jul 2008 09:31:44 +0000 (11:31 +0200)
committerMarcus Eggenberger <egs@quassel-irc.org>
Fri, 11 Jul 2008 09:32:14 +0000 (11:32 +0200)
src/client/networkmodel.cpp

index 1892ecc..1a36ac0 100644 (file)
@@ -426,8 +426,13 @@ void ChannelBufferItem::userModeChanged(IrcUser *ircUser) {
   int categoryId = UserCategoryItem::categoryFromModes(_ircChannel->userModes(ircUser));
   UserCategoryItem *categoryItem = qobject_cast<UserCategoryItem *>(childById(qHash(categoryId)));
     
-  if(categoryItem && categoryItem->childById(qHash(ircUser)))
-    return; // already in the right category;
+  if(categoryItem) {
+    if(categoryItem->childById(qHash(ircUser)))
+      return; // already in the right category;
+  } else {
+    categoryItem = new UserCategoryItem(categoryId, this);
+    newChild(categoryItem);
+  }
 
   // find the item that needs reparenting
   IrcUserItem *ircUserItem = 0;