mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 22:49:20 +00:00
* bufferview_funcs.C: reconstruct par.rows() in case of empty par creation.
* text2.C: tiny optimisation in LyXText::editXY() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15878 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2625a23437
commit
5514cc9901
@ -177,7 +177,9 @@ Point coordOffset(BufferView const & bv, DocIterator const & dit,
|
|||||||
// Add contribution of initial rows of outermost paragraph
|
// Add contribution of initial rows of outermost paragraph
|
||||||
CursorSlice const & sl = dit[0];
|
CursorSlice const & sl = dit[0];
|
||||||
Paragraph const & par = sl.text()->getPar(sl.pit());
|
Paragraph const & par = sl.text()->getPar(sl.pit());
|
||||||
// FIXME: I wonder if a case exists where this could happen:
|
if (par.rows().empty())
|
||||||
|
// FIXME: The special case below happens for empty paragraph creation
|
||||||
|
const_cast<LyXText *>(sl.text())->redoParagraph(const_cast<BufferView &>(bv), sl.pit());
|
||||||
BOOST_ASSERT(!par.rows().empty());
|
BOOST_ASSERT(!par.rows().empty());
|
||||||
y -= par.rows()[0].ascent();
|
y -= par.rows()[0].ascent();
|
||||||
#if 1
|
#if 1
|
||||||
|
@ -986,7 +986,7 @@ InsetBase * LyXText::editXY(LCursor & cur, int x, int y)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
InsetBase * insetBefore = pars_[pit].getInset(pos - 1);
|
InsetBase * insetBefore = pos? pars_[pit].getInset(pos - 1): 0;
|
||||||
//InsetBase * insetBehind = pars_[pit].getInset(pos);
|
//InsetBase * insetBehind = pars_[pit].getInset(pos);
|
||||||
|
|
||||||
// This should be just before or just behind the
|
// This should be just before or just behind the
|
||||||
|
Loading…
Reference in New Issue
Block a user