mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 00:38:01 +00:00
Bug fix: correctly redraw a Row containing and inset which Dimension slightly changed. This replace the need for the former leftEdgeFixed boolean in rowpainter.C:paintPar() before the removal of the wide() hack in revision 19834.
* Inset::dimension(): access to dim_ * TextMetrics::redoParagraph(): don't trust Inset::metrics() returned boolean as the internal dimension is changed down in the inheritance chain for InsetFoot->InsetCollapsable->InsetText. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19838 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cb25c9980e
commit
b52c339cce
@ -221,13 +221,15 @@ bool TextMetrics::redoParagraph(pit_type const pit)
|
||||
InsetList::const_iterator ii = par.insetlist.begin();
|
||||
InsetList::const_iterator iend = par.insetlist.end();
|
||||
for (; ii != iend; ++ii) {
|
||||
Dimension old_dim = ii->inset->dimension();
|
||||
Dimension dim;
|
||||
int const w = max_width_ - text_->leftMargin(buffer, max_width_, pit, ii->pos)
|
||||
- right_margin;
|
||||
Font const & font = ii->inset->noFontChange() ?
|
||||
bufferfont : text_->getFont(buffer, par, ii->pos);
|
||||
MetricsInfo mi(bv_, font, w);
|
||||
changed |= ii->inset->metrics(mi, dim);
|
||||
ii->inset->metrics(mi, dim);
|
||||
changed |= (old_dim != dim);
|
||||
}
|
||||
|
||||
par.setBeginOfBody();
|
||||
|
@ -474,6 +474,8 @@ public:
|
||||
/// reject the changes within the inset
|
||||
virtual void rejectChanges(BufferParams const &) {};
|
||||
|
||||
/// FIXME: move dim_ out of Inset!
|
||||
Dimension const & dimension() { return dim_; }
|
||||
/// inset width.
|
||||
int width() const { return dim_.wid; }
|
||||
/// inset ascent.
|
||||
|
Loading…
x
Reference in New Issue
Block a user