futher internal prettifications of the buffer switching process
[quassel.git] / src / qtui / mainwin.cpp
index d700b64..aaa59f4 100644 (file)
@@ -111,7 +111,7 @@ void MainWin::init() {
   disconnectedFromCore();  // Disable menus and stuff
   showCoreConnectionDlg(true); // autoconnect if appropriate
 
-  // attach the BufferWidget to the PropertyMapper
+  // attach the BufferWidget to the BufferModel and the default selection
   ui.bufferWidget->setModel(Client::bufferModel());
   ui.bufferWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
 
@@ -208,6 +208,10 @@ void MainWin::setupNickWidget() {
 
   ui.menuViews->addAction(nickDock->toggleViewAction());
 
+  // attach the NickListWidget to the BufferModel and the default selection
+  nickListWidget->setModel(Client::bufferModel());
+  nickListWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
+
   Client::bufferModel()->mapProperty(0, NetworkModel::BufferIdRole, nickListWidget, "currentBuffer");
 }
 
@@ -339,7 +343,7 @@ void MainWin::disconnectedFromCore() {
   //ui.actionNetworkList->setEnabled(false);
   ui.bufferWidget->hide();
   ui.actionConnectCore->setEnabled(true);
-  nickListWidget->reset();
+  // nickListWidget->reset();
   statusBar()->showMessage(tr("Not connected to core."));
 }