commit 7b431ff0ba662738baa82af6fc43098140e28460
Author: Pavel Sanda <sa...@lyx.org>
Date:   Wed Dec 19 21:47:06 2018 +0100

    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 9ecbdbb..66278e0 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 9581c73..667b442 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 58a515a..0ffc423 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
 

Reply via email to