]> git.lyx.org Git - features.git/commitdiff
Preview and math now update on screen-up (#6173)
authorScott Kostyshak <skostysh@lyx.org>
Sun, 19 Apr 2015 00:31:18 +0000 (20:31 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Tue, 21 Apr 2015 06:40:18 +0000 (02:40 -0400)
When editing a preview inset, or math, when we leave the inset, we
should update the preview. This update now happens for screen-up and
screen-down (commonly bound to Page Up and Page Down).

Note that this is only relevant if preview is turned on in
preferences.

This commit probably fixes other issues for any inset that defines
notifyCursorLeaves().

This fixes only part of #6173.

src/BufferView.cpp

index 8948b73d2de8b2d082807652a7069d802625336c..8a947c169fb12e30e80f6aff2bd8065a0406cd69 100644 (file)
@@ -1748,6 +1748,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                Cursor old = cur;
                bool const in_texted = cur.inTexted();
                cur.setCursor(doc_iterator_begin(cur.buffer()));
+               if (cur != old)
+                       notifyCursorLeavesOrEnters(old, cur);
                cur.selHandle(false);
                buffer_.changed(true);
                updateHoveredInset();