diff options
author | André Nusser <andre.nusser@googlemail.com> | 2017-04-01 13:23:52 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2017-04-01 16:33:49 +0200 |
commit | 3f5255f5362877d0a4d942a65df62f7b977fb547 (patch) | |
tree | e2c18f9ccbc4ceaa6b47a322ff4cd485e2700e86 /plugingui/slider.cc | |
parent | 8a73790a442f2100cdd6de934ed0529b5c3d8a75 (diff) |
Fix bug in slider when width == 0 || height == 0.
Diffstat (limited to 'plugingui/slider.cc')
-rw-r--r-- | plugingui/slider.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugingui/slider.cc b/plugingui/slider.cc index 039123e..c657eb1 100644 --- a/plugingui/slider.cc +++ b/plugingui/slider.cc @@ -93,8 +93,11 @@ void Slider::repaintEvent(RepaintEvent* repaintEvent) //} p.setColour(Colour(0.3, alpha)); - p.drawPoint(0, height() - 1); - p.drawPoint(width() - 1, 0); + + if (height() > 0 && width() > 0) { + p.drawPoint(0, height() - 1); + p.drawPoint(width() - 1, 0); + } } void Slider::buttonEvent(ButtonEvent* buttonEvent) |