From baf10dc4e30db46f21091267721191ce71f12553 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 11 Feb 2015 21:34:49 -0500 Subject: [PATCH] Editor::sample_to_pixel() always returns an integer value, but it should use explicit rounding --- gtk2_ardour/editor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {