* text.C (setCursorFromCoordinates):

* text2.C (setCursorIntern): add an assertion.

	* BufferView_pimpl.C (scrollDocView): reset cursor before setting
	it from coordinates (bug 2830).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15005 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-09-15 09:53:33 +00:00
parent c50a5e9897
commit 29396209ad
5 changed files with 16 additions and 1 deletions

View File

@ -519,10 +519,12 @@ void BufferView::Pimpl::scrollDocView(int value)
switch (st) {
case bv_funcs::CUR_ABOVE:
cur.reset(buffer_->inset());
t.setCursorFromCoordinates(cur, 0, first);
cur.clearSelection();
break;
case bv_funcs::CUR_BELOW:
cur.reset(buffer_->inset());
t.setCursorFromCoordinates(cur, 0, last);
cur.clearSelection();
break;

View File

@ -1,7 +1,15 @@
2006-09-15 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text.C (setCursorFromCoordinates):
* text2.C (setCursorIntern): add an assertion.
* BufferView_pimpl.C (scrollDocView): reset cursor before setting
it from coordinates (bug 2830).
2006-09-15 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* paragraph_funcs.C (breakParagraph): make sure to respect nesting
when depth > 0 (bug 2445)/
when depth > 0 (bug 2445).
2006-09-14 Jürgen Spitzmüller <j.spitzmueller@gmx.de>

View File

@ -2462,6 +2462,7 @@ pos_type LyXText::x2pos(pit_type pit, int row, int x) const
// sets cursor only within this LyXText
bool LyXText::setCursorFromCoordinates(LCursor & cur, int const x, int const y)
{
BOOST_ASSERT(this == cur.text());
pit_type pit = getPitNearY(y);
int yy = theCoords.get(this, pit).y_ - pars_[pit].ascent();
lyxerr[Debug::DEBUG]

View File

@ -695,6 +695,7 @@ void LyXText::setCursor(CursorSlice & cur, pit_type par, pos_type pos)
void LyXText::setCursorIntern(LCursor & cur,
pit_type par, pos_type pos, bool setfont, bool boundary)
{
BOOST_ASSERT(this == cur.text());
cur.boundary(boundary);
setCursor(cur.top(), par, pos);
cur.setTargetX();

View File

@ -84,6 +84,9 @@ What's new
- Fix a crash when searching for an inset and none is present.
- Fix a crash when scrolling the document and the cursor is inside an
inset (bug 2830).
- Fix lockup when accepting a change in a text inset (bug 2510).
- Fix a crash with change tracking in tables (bug 2600).