summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-05-31 17:07:02 +0000
committerCarl Hetherington <carl@carlh.net>2012-05-31 17:07:02 +0000
commit650f16620d270523aee04b15419dc9d667042928 (patch)
treef20b652687b62883fdcb1c4daa28cc36eb25c3a9 /gtk2_ardour/editor.h
parentfc77252d5186360c6a00f0f098f43253cd26e4ba (diff)
Don't round conversions from frame to unit when setting up control points, as it will cause big inaccuracies when zoomed out.
git-svn-id: svn://localhost/ardour2/branches/3.0@12503 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.h')
-rw-r--r--gtk2_ardour/editor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index e51fe88d45..0dd162ca20 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -239,6 +239,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
return rint ((double) frame / (double) frames_per_unit);
}
+ double frame_to_unit_unrounded (framepos_t frame) const {
+ return frame / frames_per_unit;
+ }
+
double frame_to_unit (double frame) const {
return rint (frame / frames_per_unit);
}