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 {