* src/BufferView.C (mouseSetCursor): update fixes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17767 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-04-10 16:50:19 +00:00
parent b4ef6a87a3
commit 05c47c5ff7

View File

@ -1341,14 +1341,17 @@ bool BufferView::mouseSetCursor(LCursor & cur)
// Has the cursor just left the inset?
bool badcursor = false;
if (&cursor_.inset() != &cur.inset())
bool leftinset = (&cursor_.inset() != &cur.inset());
if (leftinset)
badcursor = cursor_.inset().notifyCursorLeaves(cursor_);
// do the dEPM magic if needed
// FIXME: move this to InsetText::notifyCursorLeaves?
bool update = false;
// FIXME: (1) move this to InsetText::notifyCursorLeaves?
// FIXME: (2) if we had a working InsetText::notifyCursorLeaves,
// the leftinset bool would not be necessary (badcursor instead).
bool update = leftinset;
if (!badcursor && cursor_.inTexted())
checkDepm(cur, cursor_);
update |= checkDepm(cur, cursor_);
// if the cursor was in an empty script inset and the new
// position is in the nucleus of the inset, notifyCursorLeaves