summaryrefslogtreecommitdiff
path: root/libs/canvas/rectangle.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-11-03 21:48:02 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-11-03 21:48:08 -0500
commitf1e6b28ab7759f9bc93eb965cbe7740f1bafb2d3 (patch)
treef2403f8e8789787c2215a7899378fe1259084889 /libs/canvas/rectangle.cc
parent56994e785ec49f79e65b2e31535119d85c7100a0 (diff)
use ArdourCanvas::TimeRectangle for regions, notes, markers
Diffstat (limited to 'libs/canvas/rectangle.cc')
-rw-r--r--libs/canvas/rectangle.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/libs/canvas/rectangle.cc b/libs/canvas/rectangle.cc
index c6381776e4..232da17893 100644
--- a/libs/canvas/rectangle.cc
+++ b/libs/canvas/rectangle.cc
@@ -255,17 +255,18 @@ void
TimeRectangle::compute_bounding_box () const
{
Rectangle::compute_bounding_box ();
- assert (_bounding_box);
- Rect r = _bounding_box.get ();
-
- /* This is a TimeRectangle, so its right edge is drawn 1 pixel beyond
- * (larger x-axis coordinates) than a normal Rectangle.
- */
-
- r.x1 += 1.0; /* this should be using safe_add() */
-
- _bounding_box = r;
+ if (_bounding_box) {
+ Rect r = _bounding_box.get ();
+
+ /* This is a TimeRectangle, so its right edge is drawn 1 pixel beyond
+ * (larger x-axis coordinates) than a normal Rectangle.
+ */
+
+ r.x1 += 1.0; /* this should be using safe_add() */
+
+ _bounding_box = r;
+ }
}
void