Some cleanups in ChatScene in preparation to mouse handling revamp
[quassel.git] / src / qtui / chatview.cpp
index d360d9d..53fa024 100644 (file)
@@ -61,7 +61,7 @@ void ChatView::init(MessageFilter *filter) {
   _scrollTimer.setSingleShot(true);
   connect(&_scrollTimer, SIGNAL(timeout()), SLOT(scrollTimerTimeout()));
 
-  _scene = new ChatScene(filter, filter->idString(), viewport()->width() - 2, this); // see below: resizeEvent()
+  _scene = new ChatScene(filter, filter->idString(), viewport()->width() - 4, this); // see below: resizeEvent()
   connect(_scene, SIGNAL(sceneRectChanged(const QRectF &)), this, SLOT(sceneRectChanged(const QRectF &)));
   connect(_scene, SIGNAL(lastLineChanged(QGraphicsItem *, qreal)), this, SLOT(lastLineChanged(QGraphicsItem *, qreal)));
   connect(_scene, SIGNAL(mouseMoveWhileSelecting(const QPointF &)), this, SLOT(mouseMoveWhileSelecting(const QPointF &)));
@@ -108,6 +108,10 @@ void ChatView::scrollTimerTimeout() {
 
 void ChatView::lastLineChanged(QGraphicsItem *chatLine, qreal offset) {
   Q_UNUSED(chatLine)
+  // disabled until further testing/discussion
+  //if(!scene()->isScrollingAllowed())
+  //  return;
+
   QAbstractSlider *vbar = verticalScrollBar();
   Q_ASSERT(vbar);
   if(vbar->maximum() - vbar->value() <= (offset + 5) * _currentScaleFactor ) { // 5px grace area