diff options
Diffstat (limited to 'src/gui/widgets/sliderlist.cpp')
-rw-r--r-- | src/gui/widgets/sliderlist.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp index 22fcb8956..3dc5df633 100644 --- a/src/gui/widgets/sliderlist.cpp +++ b/src/gui/widgets/sliderlist.cpp @@ -120,6 +120,19 @@ void SliderList::draw(Graphics *graphics) BLOCK_END("SliderList::draw") } +void SliderList::safeDraw(Graphics *graphics) +{ + BLOCK_START("SliderList::draw") + const int width = mDimension.width; + if (mOldWidth != width) + { + resize(); + mOldWidth = width; + } + Container::draw(graphics); + BLOCK_END("SliderList::draw") +} + void SliderList::updateLabel() { if (!mListModel || mSelectedIndex < 0 |