Fix first draw of auto-open inset

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 7761e1317e)
This commit is contained in:
Jean-Marc Lasgouttes 2020-05-23 16:47:48 +02:00 committed by Richard Kimberly Heck
parent dab0e4cb97
commit 0fde27465d
2 changed files with 10 additions and 0 deletions

View 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;
}

View File

@ -41,6 +41,8 @@ What's new
* USER INTERFACE
- Fix problem with drawing of auto-opened insets (bug 11870).
* INTERNALS