This commit is contained in:
Pavel Sanda 2018-12-19 21:47:06 +01:00
parent cb848bbcd0
commit 7b431ff0ba
3 changed files with 7 additions and 2 deletions

View File

@ -1248,7 +1248,10 @@ Inset * BufferView::editedInset(string const & name) const
void BufferView::editInset(string const & name, Inset * inset) void BufferView::editInset(string const & name, Inset * inset)
{ {
if (inset)
d->edited_insets_[name] = inset; d->edited_insets_[name] = inset;
else
d->edited_insets_.erase(name);
} }

View File

@ -4559,7 +4559,7 @@ void GuiView::doShowDialog(QString const & qname, QString const & qdata,
if (dialog) { if (dialog) {
bool const visible = dialog->isVisibleView(); bool const visible = dialog->isVisibleView();
dialog->showData(data); dialog->showData(data);
if (inset && currentBufferView()) if (currentBufferView())
currentBufferView()->editInset(name, inset); currentBufferView()->editInset(name, inset);
// We only set the focus to the new dialog if it was not yet // We only set the focus to the new dialog if it was not yet
// visible in order not to change the existing previous behaviour // visible in order not to change the existing previous behaviour

View File

@ -37,6 +37,8 @@ What's new
- Add "Reset" and "Restore Defaults" buttons to Text Properties - Add "Reset" and "Restore Defaults" buttons to Text Properties
dialog (bug 11415). dialog (bug 11415).
- Insert new graphics inset on the correct cursor position.
* DOCUMENTATION AND LOCALIZATION * DOCUMENTATION AND LOCALIZATION