]> git.lyx.org Git - features.git/commitdiff
* src/BufferView.C (mouseSetCursor): update fixes.
authorJürgen Spitzmüller <spitz@lyx.org>
Tue, 10 Apr 2007 16:50:19 +0000 (16:50 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Tue, 10 Apr 2007 16:50:19 +0000 (16:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17767 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.C

index 4b288ba7f5f306ed78b89503496f98c510a52fb5..0394673d7ca60b5c9871cdced20648cb1b2e420a 100644 (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