]> git.lyx.org Git - lyx.git/commitdiff
Fix first draw of auto-open inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 23 May 2020 14:47:48 +0000 (16:47 +0200)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 5 Jun 2020 19:40:44 +0000 (15:40 -0400)
note-next and reference-next should trigger an update so that metrics
are updated when the cursor ends up in an auto-open inset.

Fixes bug #11870.

(cherry picked from commit 7761e1317eaa2c880446f05b707b03067d665681)

src/BufferView.cpp
status.23x

index d3d5dffea8027d4c8c4ec3f10096626bf63f47fb..c15b7d3b88d3c2ea29e7ad9a5b1156d27570a98f 100644 (file)
@@ -1504,6 +1504,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 
        case LFUN_NOTE_NEXT:
                gotoInset(this, NOTE_CODE, false);
+               // FIXME: if SinglePar is changed to act on the inner
+               // paragraph, this will not be OK anymore. The update is
+               // useful for auto-open collapsible insets.
+               dr.screenUpdate(Update::SinglePar | Update::FitCursor);
                break;
 
        case LFUN_REFERENCE_NEXT: {
@@ -1511,6 +1515,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                tmp.push_back(LABEL_CODE);
                tmp.push_back(REF_CODE);
                gotoInset(this, tmp, true);
+               // FIXME: if SinglePar is changed to act on the inner
+               // paragraph, this will not be OK anymore. The update is
+               // useful for auto-open collapsible insets.
+               dr.screenUpdate(Update::SinglePar | Update::FitCursor);
                break;
        }
 
index d490a7058f23daa8830d67ad59d30448afdfed48..610d0602a4e229e4f95069877b546148fdb62301 100644 (file)
@@ -41,6 +41,8 @@ What's new
 
 * USER INTERFACE
 
+- Fix problem with drawing of auto-opened insets (bug 11870).
+
 
 * INTERNALS