mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-13 03:40:34 +00:00
Bug fix: correctly redraw a Row containing and inset which Dimension slightly changed. This replace the need for leftEdgeFixed boolean in rowpainter.C:paintPar() which can be removed now.
* Inset::dimension(): access to dim_ * TextMetrics?::redoParagraph(): checking Inset::metrics() returned boolean is not enough 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/branches/BRANCH_1_5_X@20221 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b01b6a3023
commit
5f24e6cc63
@ -216,6 +216,7 @@ 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;
|
||||
@ -223,6 +224,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
|
||||
bufferfont : text_->getFont(buffer, par, ii->pos);
|
||||
MetricsInfo mi(bv_, font, w);
|
||||
changed |= ii->inset->metrics(mi, dim);
|
||||
changed |= (old_dim != dim);
|
||||
}
|
||||
|
||||
// rebreak the paragraph
|
||||
|
@ -461,6 +461,8 @@ public:
|
||||
/// reject the changes within the inset
|
||||
virtual void rejectChanges(BufferParams const &) {};
|
||||
|
||||
/// inset dimension.
|
||||
Dimension const & dimension() const { return dim_; }
|
||||
/// inset width.
|
||||
int width() const { return dim_.wid; }
|
||||
/// inset ascent.
|
||||
|
Loading…
x
Reference in New Issue
Block a user