From 230b29dce3fa51ffac9d5e834e6bc7c4764f2c15 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Fri, 7 Nov 2008 08:47:34 +0100 Subject: [PATCH] Fix ChatItem clipping (when selecting lines) Yes, I remember again why I set a clipRect for the painter. And I still don't know why the item doesn't clip automatically. --- src/qtui/chatitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index 679dc872..a78d2f8a 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -265,7 +265,7 @@ void ChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { void SenderChatItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); Q_UNUSED(widget); - //painter->setClipRect(boundingRect()); // no idea why QGraphicsItem clipping won't work + painter->setClipRect(boundingRect()); // no idea why QGraphicsItem clipping won't work qreal layoutWidth = layout()->minimumWidth(); qreal offset = 0; if(chatScene()->senderCutoffMode() == ChatScene::CutoffLeft) -- 2.20.1