mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 20:39:40 +00:00
Merge branch 'toscrollornottoscroll' into 'master'
Don't create a scrollbar that cannot be scrolled Closes #8364 See merge request OpenMW/openmw!4552
This commit is contained in:
commit
73bb281f34
2 changed files with 3 additions and 1 deletions
|
@ -227,6 +227,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…
Reference in a new issue