Merge pull request #7798 from Robyt3/Textrender-Selection-Fix

Fix multi-line text selection not rendered correctly anymore
This commit is contained in:
Dennis Felsing 2024-01-13 22:54:33 +00:00 committed by GitHub
commit a7ac29d5bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1867,7 +1867,7 @@ public:
if(SelectionStarted && IsRendered)
{
if(!vSelectionQuads.empty() && SelectionQuadLine == pCursor->m_LineCount)
if(!vSelectionQuads.empty() && SelectionQuadLine == LineCount)
{
vSelectionQuads.back().m_Width += SelWidth;
}
@ -1877,7 +1877,7 @@ public:
const float SelectionY = DrawY + (1.0f - pCursor->m_SelectionHeightFactor) * SelectionHeight;
const float ScaledSelectionHeight = pCursor->m_SelectionHeightFactor * SelectionHeight;
vSelectionQuads.emplace_back(SelX, SelectionY, SelWidth, ScaledSelectionHeight);
SelectionQuadLine = pCursor->m_LineCount;
SelectionQuadLine = LineCount;
}
}