From bea613d8ba11a64ccf36a01735f2839894ca9476 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 May 2015 20:43:53 +0300 Subject: Fix some issues in safe OpenGL renderer after last changes. --- src/gui/widgets/sliderlist.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui/widgets/sliderlist.cpp') 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 -- cgit v1.2.3-60-g2f50