diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-18 23:53:37 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-18 23:53:37 +0000 |
commit | 1c3d7637b5ca0a44f6d7f7686734c8d2449ab6db (patch) | |
tree | bed46baa929b6f1b011543014f575db6362f734a /gtk2_ardour/audio_region_view.cc | |
parent | 556c627fed79073fe1ee71f1e71dba1de217a1b2 (diff) |
Hopefully fix visual glitches on dragging fade ins/outs.
git-svn-id: svn://localhost/ardour2/branches/3.0@8298 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index c3a2903e8b..51a016d2c3 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -588,8 +588,9 @@ AudioRegionView::reset_fade_in_shape_width (framecnt_t width) width = std::max ((framecnt_t) 64, width); Points* points; - - double pwidth = width / samples_per_unit; + + /* round here to prevent little visual glitches with sub-pixel placement */ + double const pwidth = rint (width / samples_per_unit); uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth); double h; @@ -674,7 +675,9 @@ AudioRegionView::reset_fade_out_shape_width (framecnt_t width) width = std::max ((framecnt_t) 64, width); Points* points; - double pwidth = width / samples_per_unit; + + /* round here to prevent little visual glitches with sub-pixel placement */ + double const pwidth = rint (width / samples_per_unit); uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth); double h; |