From 3f5255f5362877d0a4d942a65df62f7b977fb547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 1 Apr 2017 13:23:52 +0200 Subject: Fix bug in slider when width == 0 || height == 0. --- plugingui/slider.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugingui/slider.cc') 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) -- cgit v1.2.3