summaryrefslogtreecommitdiff
path: root/src/gui/widgets/sliderlist.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-25 20:43:53 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-25 21:33:18 +0300
commitbea613d8ba11a64ccf36a01735f2839894ca9476 (patch)
tree8d5de8bf983f13aec50b3f1234db09b88dff26d3 /src/gui/widgets/sliderlist.cpp
parent80b0caa35e4b84b745daef7e4102b428539cdee5 (diff)
downloadmv-bea613d8ba11a64ccf36a01735f2839894ca9476.tar.gz
mv-bea613d8ba11a64ccf36a01735f2839894ca9476.tar.bz2
mv-bea613d8ba11a64ccf36a01735f2839894ca9476.tar.xz
mv-bea613d8ba11a64ccf36a01735f2839894ca9476.zip
Fix some issues in safe OpenGL renderer after last changes.
Diffstat (limited to 'src/gui/widgets/sliderlist.cpp')
-rw-r--r--src/gui/widgets/sliderlist.cpp13
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