mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed editor data not cleared on cancel.
This commit is contained in:
@@ -353,6 +353,7 @@ loot-clear-metadata
|
||||
/* If the editor hasn't already been opened, its data is not yet set, so do that now. */
|
||||
if (!card.data.isEditorOpen && !card.data.editor) {
|
||||
card.shadowRoot.getElementById('editor').data = card.data;
|
||||
card.shadowRoot.getElementById('editor').setEditorData(card.data);
|
||||
}
|
||||
|
||||
card.data.isEditorOpen = true;
|
||||
|
||||
@@ -494,6 +494,7 @@ function onEditorClose(evt) {
|
||||
/* Don't need to record changes, but still need to notify C++ side that
|
||||
the editor has been closed. */
|
||||
loot.query('editorClosed').catch(processCefError);
|
||||
delete evt.target.data.editor;
|
||||
}
|
||||
|
||||
/* Now hide editor. */
|
||||
|
||||
Reference in New Issue
Block a user