summaryrefslogtreecommitdiff
path: root/libs/canvas/text.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-10-28 12:27:33 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-10-28 12:27:33 -0400
commitf28fb76bd9f704ee2354e5beaf2b89e589f0e2e3 (patch)
treeeec67122661ea702b741944826455a1ea6747f5a /libs/canvas/text.cc
parent1eb680f937efc9833c52dad52de170e30df06d60 (diff)
fix computation of Text bounding box to respect _clamped_width
Diffstat (limited to 'libs/canvas/text.cc')
-rw-r--r--libs/canvas/text.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/canvas/text.cc b/libs/canvas/text.cc
index acc25b9ffc..438413080a 100644
--- a/libs/canvas/text.cc
+++ b/libs/canvas/text.cc
@@ -159,7 +159,7 @@ Text::compute_bounding_box () const
Glib::RefPtr<Pango::Context> context = Glib::wrap (gdk_pango_context_get()); // context now owns C object and will free it
redraw (context);
}
- _bounding_box = Rect (0, 0, _image->get_width(), _image->get_height());
+ _bounding_box = Rect (0, 0, min (_clamped_width, (double) _image->get_width()), _image->get_height());
_bounding_box_dirty = false;
}
}