mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branch 'pr1522' into back_in_the_game
This commit is contained in:
commit
f76434f94f
|
@ -177,33 +177,17 @@ void ChatLog::mousePressEvent(QMouseEvent* ev)
|
||||||
{
|
{
|
||||||
QGraphicsView::mousePressEvent(ev);
|
QGraphicsView::mousePressEvent(ev);
|
||||||
|
|
||||||
QPointF scenePos = mapToScene(ev->pos());
|
|
||||||
|
|
||||||
if(ev->button() == Qt::LeftButton)
|
if(ev->button() == Qt::LeftButton)
|
||||||
{
|
{
|
||||||
clickPos = ev->pos();
|
clickPos = ev->pos();
|
||||||
clearSelection();
|
clearSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ev->button() == Qt::RightButton)
|
|
||||||
{
|
|
||||||
if(!isOverSelection(scenePos))
|
|
||||||
clearSelection();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLog::mouseReleaseEvent(QMouseEvent* ev)
|
void ChatLog::mouseReleaseEvent(QMouseEvent* ev)
|
||||||
{
|
{
|
||||||
QGraphicsView::mouseReleaseEvent(ev);
|
QGraphicsView::mouseReleaseEvent(ev);
|
||||||
|
|
||||||
QPointF scenePos = mapToScene(ev->pos());
|
|
||||||
|
|
||||||
if(ev->button() == Qt::RightButton)
|
|
||||||
{
|
|
||||||
if(!isOverSelection(scenePos))
|
|
||||||
clearSelection();
|
|
||||||
}
|
|
||||||
|
|
||||||
selectionScrollDir = NoDirection;
|
selectionScrollDir = NoDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user