Editor::sample_to_pixel() always returns an integer value, but it should use explicit...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 12 Feb 2015 02:34:49 +0000 (21:34 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 12 Feb 2015 02:59:38 +0000 (21:59 -0500)
gtk2_ardour/editor.h

index c7d323576f554e4941b31510f662bbf0a72c1243..6fd2c7d96a6fb8a13a56412009d5c96b57448520 100644 (file)
@@ -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 {