summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-02-11 21:34:49 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-02-11 21:59:38 -0500
commitbaf10dc4e30db46f21091267721191ce71f12553 (patch)
tree4e72c19a7baceb3ff851559e1247184fb89e757c /gtk2_ardour
parente8c24f1efda442d3a17a774c31ce4452c8d84de9 (diff)
Editor::sample_to_pixel() always returns an integer value, but it should use explicit rounding
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index c7d323576f..6fd2c7d96a 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -232,7 +232,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
}
double sample_to_pixel (framepos_t sample) const {
- return sample / samples_per_pixel;
+ return round (sample / (double) samples_per_pixel);
}
double sample_to_pixel_unrounded (framepos_t sample) const {