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
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -2707,6 +2707,10 @@ void ChannelView::mouseDoubleClickEvent(QMouseEvent *event)
if (hoverLayoutElement == nullptr)
{
// XXX: this is duplicate work
auto idx = layout->getSelectionIndex(relativePos);
SelectionItem item(messageIndex, idx);
this->doubleClickSelection_ = {item, item};
return;
}