From: Paul Davis Date: Mon, 28 Oct 2013 16:27:33 +0000 (-0400) Subject: fix computation of Text bounding box to respect _clamped_width X-Git-Tag: 1.0.0~1065 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=f28fb76bd9f704ee2354e5beaf2b89e589f0e2e3;p=ardour.git fix computation of Text bounding box to respect _clamped_width --- 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 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; } }