summaryrefslogtreecommitdiffhomepage
path: root/spline/spline-widget.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-21 08:33:19 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-21 08:33:19 +0200
commitf3a0f680f83e782aaa7d5bcdfb5dd080fe1e2a10 (patch)
tree302ac6719e1edce6ea1b179ec2c180a4bbcf2d17 /spline/spline-widget.hpp
parent12119e9fa2566624ed63305448cab9cf21017250 (diff)
spline: minor cleanup
Diffstat (limited to 'spline/spline-widget.hpp')
-rw-r--r--spline/spline-widget.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/spline/spline-widget.hpp b/spline/spline-widget.hpp
index 062db493..711bdb2a 100644
--- a/spline/spline-widget.hpp
+++ b/spline/spline-widget.hpp
@@ -40,7 +40,6 @@ public:
spline_widget(QWidget *parent = 0);
~spline_widget();
- spline* config();
void setConfig(spline* spl);
QColor colorBezier() const;
@@ -52,8 +51,8 @@ public:
double x_step() { return _x_step; }
double y_step() { return _y_step; }
- void set_x_step(double val) { _x_step = val; }
- void set_y_step(double val) { _y_step = val; }
+ void set_x_step(double val) { _x_step = std::fmax(1., val); }
+ void set_y_step(double val) { _y_step = std::fmax(1., val); }
void set_snap(double x, double y) { snap_x = x; snap_y = y; }
void get_snap(double& x, double& y) const { x = snap_x; y = snap_y; }