summaryrefslogtreecommitdiffhomepage
path: root/spline/spline-widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'spline/spline-widget.cpp')
-rw-r--r--spline/spline-widget.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp
index 0378da09..0b3e8da2 100644
--- a/spline/spline-widget.cpp
+++ b/spline/spline-widget.cpp
@@ -204,7 +204,7 @@ void spline_widget::drawFunction()
//#define DEBUG_SPLINE
#ifndef DEBUG_SPLINE
- static constexpr double step_ = 3./3;
+ static constexpr double step_ = 5;
const double maxx = _config->max_input();
const double step = step_ / c.x();
@@ -266,7 +266,15 @@ void spline_widget::paintEvent(QPaintEvent *e)
QPainter p(this);
- if (_background.isNull())
+ if (!_background.isNull())
+ {
+ if (_background.size() != size())
+ {
+ _background = QPixmap();
+ _function = QPixmap();
+ }
+ }
+ else
{
_draw_function = true;
drawBackground();