mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
partial fix for bug 1973
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10664 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
78ec40122d
commit
035861d4dc
@ -1,3 +1,8 @@
|
||||
2005-12-08 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* text.C (redoParagraph): honor inset->noFontChange()
|
||||
* rowpainter.C (paintInset): ditto
|
||||
|
||||
2005-12-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* lyx_main.C (priv_exec): don't initialize Math on startup
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-12-12 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* insetbase.h (noFontChange): refine documentation
|
||||
|
||||
2005-12-16 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* insetcollapsable.C: fix "turds" when changing openinlined_
|
||||
|
@ -383,7 +383,14 @@ public:
|
||||
virtual mode_type currentMode() const { return UNDECIDED_MODE; }
|
||||
/// returns whether this inset is allowed in other insets of given mode
|
||||
virtual bool allowedIn(mode_type) const { return true; }
|
||||
/// is this inset allowed within a font change?
|
||||
/**
|
||||
* Is this inset allowed within a font change?
|
||||
*
|
||||
* FIXME: noFontChange means currently that the font change is closed
|
||||
* in LaTeX before the inset, and that the contents of the inset
|
||||
* will be in default font. This should be changed so that the inset
|
||||
* changes the font again.
|
||||
*/
|
||||
virtual bool noFontChange() const { return false; }
|
||||
|
||||
/// mark the inset as erased or not
|
||||
|
@ -154,7 +154,11 @@ void RowPainter::paintInset(pos_type const pos, LyXFont const & font)
|
||||
InsetBase const * inset = par_.getInset(pos);
|
||||
BOOST_ASSERT(inset);
|
||||
PainterInfo pi(const_cast<BufferView *>(&bv_), pain_);
|
||||
pi.base.font = font;
|
||||
// FIXME: We should always use font, see documentation of
|
||||
// noFontChange() in insetbase.h.
|
||||
pi.base.font = inset->noFontChange() ?
|
||||
bv_.buffer()->params().getLyXTextClass().defaultfont() :
|
||||
font;
|
||||
pi.ltr_pos = (text_.bidi.level(pos) % 2 == 0);
|
||||
pi.erased_ = erased_ || isDeletedText(par_, pos);
|
||||
theCoords.insets().add(inset, int(x_), yo_);
|
||||
|
@ -1684,12 +1684,19 @@ bool LyXText::redoParagraph(pit_type const pit)
|
||||
}
|
||||
|
||||
// redo insets
|
||||
// FIXME: We should always use getFont(), see documentation of
|
||||
// noFontChange() in insetbase.h.
|
||||
LyXFont const tclassfont =
|
||||
bv()->buffer()->params().getLyXTextClass().defaultfont();
|
||||
InsetList::iterator ii = par.insetlist.begin();
|
||||
InsetList::iterator iend = par.insetlist.end();
|
||||
for (; ii != iend; ++ii) {
|
||||
Dimension dim;
|
||||
int const w = maxwidth_ - leftMargin(pit, ii->pos) - rightMargin(par);
|
||||
MetricsInfo mi(bv(), getFont(par, ii->pos), w);
|
||||
LyXFont const & font = ii->inset->noFontChange() ?
|
||||
tclassfont :
|
||||
getFont(par, ii->pos);
|
||||
MetricsInfo mi(bv(), font, w);
|
||||
ii->inset->metrics(mi, dim);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user