Fix dancing text
authornumber Zero <silverunicorn2011@yandex.ru>
Sun, 24 Dec 2017 21:54:43 +0000 (00:54 +0300)
committerSmallJoker <mk939@ymail.com>
Sun, 3 Jun 2018 15:32:00 +0000 (17:32 +0200)
src/intlGUIEditBox.cpp

index ad59ef13a2b9fd04f5c86cf354495a722151af2a..74b9f634c7db54c1348e09340a689b8f32962cd6 100644 (file)
@@ -1418,6 +1418,9 @@ void intlGUIEditBox::calculateScrollPos()
                // todo: adjust scrollbar
        }
 
+       if (!WordWrap && !MultiLine)
+               return;
+
        // vertical scroll position
        if (FrameRect.LowerRightCorner.Y < CurrentTextRect.LowerRightCorner.Y)
                VScrollPos += CurrentTextRect.LowerRightCorner.Y - FrameRect.LowerRightCorner.Y; // scrolling downwards