Fix dancing text
authornumber Zero <silverunicorn2011@yandex.ru>
Sun, 24 Dec 2017 21:54:43 +0000 (00:54 +0300)
committersfan5 <sfan5@live.de>
Mon, 25 Dec 2017 14:00:50 +0000 (15:00 +0100)
src/gui/intlGUIEditBox.cpp

index f5ea5b47fe1a7e86ff2d30aab1dc5979f63cb366..8b0f10721551393654d602df818ec84b236fc510 100644 (file)
@@ -1430,6 +1430,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