From 7b431ff0ba662738baa82af6fc43098140e28460 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Wed, 19 Dec 2018 21:47:06 +0100 Subject: [PATCH] Backport 99bfe201208. --- src/BufferView.cpp | 5 ++++- src/frontends/qt4/GuiView.cpp | 2 +- status.23x | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 9ecbdbb3af..66278e0985 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1248,7 +1248,10 @@ Inset * BufferView::editedInset(string const & name) const void BufferView::editInset(string const & name, Inset * inset) { - d->edited_insets_[name] = inset; + if (inset) + d->edited_insets_[name] = inset; + else + d->edited_insets_.erase(name); } diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 9581c73148..667b4424a8 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -4559,7 +4559,7 @@ void GuiView::doShowDialog(QString const & qname, QString const & qdata, if (dialog) { bool const visible = dialog->isVisibleView(); dialog->showData(data); - if (inset && currentBufferView()) + if (currentBufferView()) currentBufferView()->editInset(name, inset); // We only set the focus to the new dialog if it was not yet // visible in order not to change the existing previous behaviour diff --git a/status.23x b/status.23x index 58a515a3a6..0ffc423587 100644 --- a/status.23x +++ b/status.23x @@ -37,6 +37,8 @@ What's new - Add "Reset" and "Restore Defaults" buttons to Text Properties dialog (bug 11415). +- Insert new graphics inset on the correct cursor position. + * DOCUMENTATION AND LOCALIZATION -- 2.39.5