mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
[Summary] Fixed issue when width request from Cavas text returned old width value
[Reviewed by] Paul Davis Conflicts: libs/canvas/canvas/text.h
This commit is contained in:
parent
84cb8913b0
commit
96371c8327
2 changed files with 12 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ public:
|
||||||
void dump (std::ostream&) const;
|
void dump (std::ostream&) const;
|
||||||
|
|
||||||
std::string text() const { return _text; }
|
std::string text() const { return _text; }
|
||||||
|
double text_width() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string _text;
|
std::string _text;
|
||||||
|
|
|
||||||
|
|
@ -244,3 +244,14 @@ Text::dump (ostream& o) const
|
||||||
|
|
||||||
o << endl;
|
o << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double
|
||||||
|
Text::text_width() const
|
||||||
|
{
|
||||||
|
if (_need_redraw) {
|
||||||
|
redraw ();
|
||||||
|
}
|
||||||
|
|
||||||
|
return _width;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue