mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 11:27:45 +01:00
Editor::sample_to_pixel() always returns an integer value, but it should use explicit rounding
This commit is contained in:
parent
1210fafe3f
commit
4b1bbd11d1
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue