diff --git a/src/TerminalDisplay.h b/src/TerminalDisplay.h --- a/src/TerminalDisplay.h +++ b/src/TerminalDisplay.h @@ -659,6 +659,10 @@ // current size in columns and lines void showResizeNotification(); + // applies changes to scrollbarLocation to the scroll bar and propagates size + // information + void applyScrollBarPosition(); + // scrolls the image by a number of lines. // 'lines' may be positive ( to scroll the image down ) // or negative ( to scroll the image up ) diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -2072,8 +2072,12 @@ return; } - _scrollBar->setHidden(position == Enum::ScrollBarHidden); _scrollbarLocation = position; + applyScrollBarPosition(); +} + +void TerminalDisplay::applyScrollBarPosition() { + _scrollBar->setHidden(_scrollbarLocation == Enum::ScrollBarHidden); propagateSize(); update(); @@ -2715,6 +2719,7 @@ _scrollWheelState.addWheelEvent(ev); _scrollBar->event(ev); + applyScrollBarPosition(); Q_ASSERT(_sessionController != nullptr);