summaryrefslogtreecommitdiff
path: root/gtk2_ardour/tempo_lines.cc
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-10-14 13:35:17 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-10-14 13:35:17 +0000
commita8baa20be8fd65299e843611eb8bb90443806da8 (patch)
tree6b8ae64cf32cb817687529a0235ac23af852bcee /gtk2_ardour/tempo_lines.cc
parenta238ec037257be28dc1dab45c3ebbaf31376cbbf (diff)
Make tempo lines physical_screen_height high, add xml null check, Use clicked_regionview directly to calculate region movement. Using drag_info.data may result in the wrong regionbiew being used, don't use canvas coords for region_drag_finished_callback x calculation (eliminates speed adjustment), prevent incorrect updates on dropped regions by updating canvas before placing region copies.
git-svn-id: svn://localhost/ardour2/branches/3.0@3965 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/tempo_lines.cc')
-rw-r--r--gtk2_ardour/tempo_lines.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc
index ec0be1415e..1ca80ac284 100644
--- a/gtk2_ardour/tempo_lines.cc
+++ b/gtk2_ardour/tempo_lines.cc
@@ -26,11 +26,12 @@ using namespace std;
#define MAX_CACHED_LINES 128
-TempoLines::TempoLines(ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group)
+TempoLines::TempoLines(ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group, double screen_height)
: _canvas(canvas)
, _group(group)
, _clean_left(DBL_MAX)
, _clean_right(0.0)
+ , _height(screen_height)
{
}
@@ -85,7 +86,6 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
const size_t needed = points.size();
_canvas.get_scroll_region (x1, y1, x2, who_cares);
- _canvas.root()->get_bounds(who_cares, who_cares, who_cares, y2);
/* get the first bar spacing */
@@ -221,7 +221,8 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
line = new ArdourCanvas::SimpleLine (*_group);
line->property_x1() = xpos;
line->property_x2() = xpos;
- line->property_y2() = y2;
+ line->property_y1() = 0.0;
+ line->property_y2() = _height;
line->property_color_rgba() = color;
_lines.insert(make_pair(xpos, line));
inserted_last_time = true;