fix: use correct selection index when double-clicking into the void (#5617)

This commit is contained in:
nerix 2024-10-02 18:33:36 +02:00 committed by GitHub
parent 1f0816d29f
commit 4d9ea37ff4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -51,6 +51,7 @@
- Bugfix: Fixed log files being locked longer than needed. (#5592) - Bugfix: Fixed log files being locked longer than needed. (#5592)
- Bugfix: Fixed global badges not showing in anonymous mode. (#5599) - Bugfix: Fixed global badges not showing in anonymous mode. (#5599)
- Bugfix: Fixed grammar in the user highlight page. (#5602) - Bugfix: Fixed grammar in the user highlight page. (#5602)
- Bugfix: Fixed double-click selection not working when clicking outside a message. (#5617)
- Dev: Update Windows build from Qt 6.5.0 to Qt 6.7.1. (#5420) - Dev: Update Windows build from Qt 6.5.0 to Qt 6.7.1. (#5420)
- Dev: Update vcpkg build Qt from 6.5.0 to 6.7.0, boost from 1.83.0 to 1.85.0, openssl from 3.1.3 to 3.3.0. (#5422) - Dev: Update vcpkg build Qt from 6.5.0 to 6.7.0, boost from 1.83.0 to 1.85.0, openssl from 3.1.3 to 3.3.0. (#5422)
- Dev: Unsingletonize `ISoundController`. (#5462) - Dev: Unsingletonize `ISoundController`. (#5462)

View file

@ -2707,6 +2707,10 @@ void ChannelView::mouseDoubleClickEvent(QMouseEvent *event)
if (hoverLayoutElement == nullptr) if (hoverLayoutElement == nullptr)
{ {
// XXX: this is duplicate work
auto idx = layout->getSelectionIndex(relativePos);
SelectionItem item(messageIndex, idx);
this->doubleClickSelection_ = {item, item};
return; return;
} }