Fix selection rendering (#4830)

The rendering of selections was not aligned to the actual selection that took place for newlines at the end of messages, if they were the only part that was selected of that message.

In addition to that fix, we've already refactored the MessageLayoutContainer to try to make it a little bit more sane to work with in the future.

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-09-23 17:09:56 +02:00
committed by GitHub
parent c71e91200a
commit 6860c7007e
9 changed files with 886 additions and 657 deletions
+1 -1
View File
@@ -1519,7 +1519,7 @@ void ChannelView::mouseMoveEvent(QMouseEvent *event)
if (this->isLeftMouseDown_)
{
// this->pause(PauseReason::Selecting, 300);
int index = layout->getSelectionIndex(relativePos);
auto index = layout->getSelectionIndex(relativePos);
this->setSelection(this->selection_.start,
SelectionItem(messageIndex, index));