Change shortcut for hiding the current buffer to a standard keysequence
[quassel.git] / src / uisupport / abstractbuffercontainer.cpp
index 4691c94..c914461 100644 (file)
@@ -66,6 +66,9 @@ void AbstractBufferContainer::removeBuffer(BufferId bufferId) {
   _chatViews.take(bufferId);
 }
 
+/*
+  Switching to first buffer is now handled in MainWin::clientNetworkUpdated()
+
 void AbstractBufferContainer::rowsInserted(const QModelIndex &parent, int start, int end) {
   Q_UNUSED(end)
 
@@ -80,12 +83,14 @@ void AbstractBufferContainer::rowsInserted(const QModelIndex &parent, int start,
       setCurrentBuffer(id);
   }
 }
+*/
 
 void AbstractBufferContainer::currentChanged(const QModelIndex &current, const QModelIndex &previous) {
   Q_UNUSED(previous)
 
   BufferId newBufferId = current.data(NetworkModel::BufferIdRole).value<BufferId>();
-  if(newBufferId.isValid() && currentBuffer() != newBufferId) {
+  // To be able to reset the selected buffer, we don't check if buffer/index is valid here
+  if(currentBuffer() != newBufferId) {
     setCurrentBuffer(newBufferId);
     emit currentChanged(newBufferId);
     emit currentChanged(current);
@@ -97,8 +102,6 @@ void AbstractBufferContainer::setCurrentBuffer(BufferId bufferId) {
   if(prevBufferId.isValid() && _chatViews.contains(prevBufferId)) {
     MsgId msgId = _chatViews.value(prevBufferId)->lastMsgId();
     Client::setBufferLastSeenMsg(prevBufferId, msgId);
-    if(autoSetMarkerLine())
-      Client::setBufferMarkerLine(prevBufferId, msgId);
   }
 
   if(!bufferId.isValid()) {