From 4b1bbd11d1fa5b2ff88c30b5e363685d8e2f6a99 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 6e420e3ac9..6e50d87be2 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -241,7 +241,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 {