Skip to content

Commit

Permalink
move triple click select
Browse files Browse the repository at this point in the history
  • Loading branch information
kornes committed Oct 11, 2023
1 parent a70d4de commit 54fd662
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/widgets/helper/ChannelView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1975,6 +1975,15 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)
{
return;
}

// Triple-clicking a message selects the whole message
if (this->clickTimer_->isActive() &&
(fabsf(distanceBetweenPoints(this->lastDClickPosition_,
event->screenPos())) < 10.f))
{
this->selectWholeMessage(layout.get(), messageIndex);
return;
}
}
else
{
Expand Down Expand Up @@ -2056,15 +2065,6 @@ void ChannelView::mouseReleaseEvent(QMouseEvent *event)

const MessageLayoutElement *hoverLayoutElement =
layout->getElementAt(relativePos);
// Triple-clicking a message selects the whole message
if (this->clickTimer_->isActive() && this->selecting_)
{
if (fabsf(distanceBetweenPoints(this->lastDClickPosition_,
event->screenPos())) < 10.f)
{
this->selectWholeMessage(layout.get(), messageIndex);
}
}

// handle the click
this->handleMouseClick(event, hoverLayoutElement, layout);
Expand Down

0 comments on commit 54fd662

Please sign in to comment.