mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-13 08:58:35 +00:00
Don't create a scrollbar that cannot be scrolled
This commit is contained in:
parent
07cc2a72bb
commit
3e3dfac4e0
@ -228,6 +228,7 @@
|
||||
Bug #8252: Plugin dependencies are not required to be loaded
|
||||
Bug #8295: Post-processing chain is case-sensitive
|
||||
Bug #8299: Crash while smoothing landscape
|
||||
Bug #8364: Crash when clicking scrollbar without handle (divide by zero)
|
||||
Feature #1415: Infinite fall failsafe
|
||||
Feature #2566: Handle NAM9 records for manual cell references
|
||||
Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking
|
||||
|
@ -666,7 +666,8 @@ namespace MWGui
|
||||
else if (scrollbar)
|
||||
{
|
||||
mHistory->setSize(MyGUI::IntSize(mHistory->getWidth(), book->getSize().second));
|
||||
size_t range = book->getSize().second - viewHeight;
|
||||
// Scroll range should be >= 2 to enable scrolling and prevent a crash
|
||||
size_t range = std::max(book->getSize().second - viewHeight, size_t(2));
|
||||
mScrollBar->setScrollRange(range);
|
||||
mScrollBar->setScrollPosition(range - 1);
|
||||
mScrollBar->setTrackSize(
|
||||
|
Loading…
x
Reference in New Issue
Block a user