summaryrefslogtreecommitdiffhomepage
path: root/spline/spline-widget.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-16 06:11:48 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:49:13 +0100
commit07b45ca4578ccaed91f7f3c70e82dc7ffbdf47ab (patch)
tree0904b728158414937919f62714358725f52e7400 /spline/spline-widget.hpp
parent1e04979c3452d4eac633677876a88f9411a1153d (diff)
spline: fix deadlock, logic error
Tracking rarely deadlocked when saving mappings. Investigating it further also shown how a wrong bundle was used for Accela's splines.
Diffstat (limited to 'spline/spline-widget.hpp')
-rw-r--r--spline/spline-widget.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/spline/spline-widget.hpp b/spline/spline-widget.hpp
index a8adfce1..b0a76e2d 100644
--- a/spline/spline-widget.hpp
+++ b/spline/spline-widget.hpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016 Stanislaw Halik <sthalik@misaki.pl>
+/* Copyright (c) 2012-2019 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -34,12 +34,11 @@ class OTR_SPLINE_EXPORT spline_widget final : public QWidget
Q_PROPERTY(int x_step READ x_step WRITE set_x_step)
Q_PROPERTY(int y_step READ y_step WRITE set_y_step)
- using points_t = base_spline::points_t;
public:
explicit spline_widget(QWidget *parent = nullptr);
~spline_widget() override;
- void setConfig(base_spline* spl);
+ void set_config(base_spline* spl);
QColor colorBezier() const;
void setColorBezier(QColor const& color);
@@ -78,6 +77,7 @@ private:
bool is_on_pt(const QPointF& pos, int* pt = nullptr);
void update_range();
+ void changeEvent(QEvent* e) override;
QPointF pixel_to_point(const QPointF& point);
QPointF point_to_pixel(const QPointF& point);
@@ -103,7 +103,7 @@ private:
bool draw_function = true, preview_only = false;
// point's circle radius on the widget
- static constexpr inline int point_size_in_pixels_ = 4;
+ static constexpr int point_size_in_pixels_ = 4;
const double point_size_in_pixels = point_size_in_pixels_ * std::fmax(1, devicePixelRatioF() * .66);
};