fix #49956: Center and right alignment in text frames does not work as expected
This commit is contained in:
parent
3e750aee62
commit
091cf77569
2 changed files with 15 additions and 0 deletions
|
@ -35,6 +35,7 @@ TBox::TBox(Score* score)
|
|||
{
|
||||
setBoxHeight(Spatium(1));
|
||||
_text = new Text(score);
|
||||
_text->setLayoutToParentWidth(true);
|
||||
_text->setParent(this);
|
||||
_text->setTextStyleType(TextStyleType::FRAME);
|
||||
}
|
||||
|
@ -99,5 +100,18 @@ void TBox::scanElements(void* data, void (*func)(void*, Element*), bool all)
|
|||
_text->scanElements(data, func, all);
|
||||
Box::scanElements(data, func, all);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// remove
|
||||
//---------------------------------------------------------
|
||||
|
||||
void TBox::remove(Element* el)
|
||||
{
|
||||
if (el == _text) {
|
||||
_text->clear();
|
||||
}
|
||||
else
|
||||
MeasureBase::remove(el);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class TBox : public VBox {
|
|||
|
||||
virtual void layout();
|
||||
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true);
|
||||
virtual void remove(Element* el);
|
||||
Text* text() { return _text; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue