projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5d4900
)
Fix crash with empty patch-names.
author
Robin Gareus
<robin@gareus.org>
Sat, 29 Oct 2016 01:13:59 +0000
(
03:13
+0200)
committer
Robin Gareus
<robin@gareus.org>
Sat, 29 Oct 2016 17:57:43 +0000
(19:57 +0200)
An empty text will not produce a bounding box.
libs/canvas/flag.cc
patch
|
blob
|
history
diff --git
a/libs/canvas/flag.cc
b/libs/canvas/flag.cc
index 2d0bdb28305bb764a6215a60977c5627da8eff92..d0ce5af2b13c582218368e19aa61cb58f6dcfd6e 100644
(file)
--- a/
libs/canvas/flag.cc
+++ b/
libs/canvas/flag.cc
@@
-72,7
+72,11
@@
Flag::set_font_description (Pango::FontDescription font_description)
void
Flag::set_text (string const & text)
{
- _text->set (text);
+ if (text.empty ()) {
+ _text->set (" ");
+ } else {
+ _text->set (text);
+ }
boost::optional<Rect> bbox = _text->bounding_box ();
assert (bbox);