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:
parent
1c51cd788b
commit
0a7c82c2cf
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user