Prevent ChatView from scrolling up 1px on buffer switch, fixes #544
[quassel.git] / src / common / ircchannel.cpp
index 04ff143..5c2ba72 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   Copyright (C) 2005-09 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -192,8 +192,9 @@ void IrcChannel::part(IrcUser *ircuser) {
     disconnect(ircuser, 0, this, 0);
     emit ircUserParted(ircuser);
     
-    if(network->isMe(ircuser)) {
-      // we left -> clean up the channel and destroy it
+    if(network->isMe(ircuser) || _userModes.isEmpty()) {
+      // in either case we're no longer in the channel
+      //  -> clean up the channel and destroy it
       QList<IrcUser *> users = _userModes.keys();
       _userModes.clear();
       foreach(IrcUser *user, users) {