]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
Add margin to paragraph dialog.
[lyx.git] / 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