Replace selection on insert LyX Document

Fix for bug #10390
This commit is contained in:
Daniel Ramoeller 2023-05-16 10:54:52 +02:00 committed by Jean-Marc Lasgouttes
parent c0d7ac5b71
commit 5a893d9862

View File

@ -3190,6 +3190,7 @@ void BufferView::insertLyXFile(FileName const & fname, bool const ignorelang)
// set main language of imported file to context language
buf.changeLanguage(buf.language(), d->cursor_.getFont().language());
buffer_.undo().recordUndo(d->cursor_);
cap::replaceSelection(d->cursor_);
cap::pasteParagraphList(d->cursor_, pars,
buf.params().documentClassPtr(),
buf.params().authors(), el);