Only expand network items in bufferviews.
[quassel.git] / gui / bufferview.cpp
index e0923cf..03ab758 100644 (file)
@@ -97,3 +97,16 @@ void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::M
   setModel(filter);
 }
 
+void BufferView::setModel(QAbstractItemModel *model) {
+  QTreeView::setModel(model);
+  init();
+}
+
+void BufferView::dragEnterEvent(QDragEnterEvent *event) {
+  // not yet needed... this will be usefull to keep track of the active view when customizing them with drag and drop
+  QTreeView::dragEnterEvent(event);
+}
+
+void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) {
+  if(parent.parent() == QModelIndex()) setExpanded(parent, true);
+}