summaryrefslogtreecommitdiff
path: root/src/canvaswidget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/canvaswidget.cc')
-rw-r--r--src/canvaswidget.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/canvaswidget.cc b/src/canvaswidget.cc
index 5ce2731..7b3961a 100644
--- a/src/canvaswidget.cc
+++ b/src/canvaswidget.cc
@@ -29,8 +29,8 @@
#include <QGridLayout>
#define MAXVAL 10000000L
-#define SINGLESTEP MAXVAL/100000
-#define PAGESTEP MAXVAL/10000
+#define SINGLESTEP MAXVAL/10
+#define PAGESTEP MAXVAL/1000
CanvasWidget::CanvasWidget(QWidget* parent)
{
@@ -73,6 +73,8 @@ CanvasWidget::CanvasWidget(QWidget* parent)
void CanvasWidget::setXScale(float val)
{
canvas->setXScale(val);
+ xoffset->setSingleStep(std::max(val*val * SINGLESTEP, 1.0f));
+ xoffset->setPageStep(std::max(val*val * PAGESTEP, 1.0f));
}
void CanvasWidget::setYScale(float val)