summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-04-02 13:14:14 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-04-02 13:14:14 +0200
commit6de96bf555c4adc3828f3946633b97622a0f9d0c (patch)
tree59415f2652636ca635e638692beec8266bc81374
parentb91e83401d2c27831ab7d93c05edec70d32b03a4 (diff)
qfc: simplify
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index 431f56d4..c1f11ffa 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -323,12 +323,13 @@ void QFunctionConfigurator::update_range()
_background = QPixmap();
_function = QPixmap();
+
+ update();
}
bool QFunctionConfigurator::point_within_pixel(const QPointF &pt, const QPointF &pixel)
{
- QPointF pixel2(pixel_bounds.x() + pt.x() * c.x(),
- (pixel_bounds.y() + pixel_bounds.height() - pt.y() * c.y()));
+ QPointF pixel2 = point_to_pixel(pt);
return pixel2.x() >= pixel.x() - pointSize && pixel2.x() < pixel.x() + pointSize &&
pixel2.y() >= pixel.y() - pointSize && pixel2.y() < pixel.y() + pointSize;
}
@@ -363,5 +364,4 @@ QPointF QFunctionConfigurator::point_to_pixel(const QPointF& point)
void QFunctionConfigurator::resizeEvent(QResizeEvent *)
{
update_range();
- update();
}