diff options
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.cpp | 3 | ||||
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.h | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp index 144b69e1..8a61c8f6 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.cpp +++ b/qfunctionconfigurator/qfunctionconfigurator.cpp @@ -151,7 +151,10 @@ void QFunctionConfigurator::paintEvent(QPaintEvent *e) QPainter p(this); if (_background.isNull()) + { + _draw_function = true; drawBackground(); + } if (_draw_function) { _draw_function = false; diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h index 59c8ffeb..845dd29c 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.h +++ b/qfunctionconfigurator/qfunctionconfigurator.h @@ -34,6 +34,11 @@ public: spline_color = color; update(); } + void force_redraw() + { + _background = QPixmap(); + update(); + } protected slots: void paintEvent(QPaintEvent *e); void mousePressEvent(QMouseEvent *e); |