1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Right clicking anywhere wont unhighlight text, fixes #1517

This commit is contained in:
kushagra 2015-04-10 23:52:11 +05:30 committed by tux3
parent 1c51cd788b
commit 0a7c82c2cf

View File

@ -177,33 +177,17 @@ void ChatLog::mousePressEvent(QMouseEvent* ev)
{
QGraphicsView::mousePressEvent(ev);
QPointF scenePos = mapToScene(ev->pos());
if(ev->button() == Qt::LeftButton)
{
clickPos = ev->pos();
clearSelection();
}
if(ev->button() == Qt::RightButton)
{
if(!isOverSelection(scenePos))
clearSelection();
}
}
void ChatLog::mouseReleaseEvent(QMouseEvent* ev)
{
QGraphicsView::mouseReleaseEvent(ev);
QPointF scenePos = mapToScene(ev->pos());
if(ev->button() == Qt::RightButton)
{
if(!isOverSelection(scenePos))
clearSelection();
}
selectionScrollDir = NoDirection;
}