Fixed cancelling editor panels preventing LOOT closure.

This commit is contained in:
Oliver Hamlet
2014-12-23 16:40:12 +00:00
parent 86ff5b104f
commit 465644e647
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -885,6 +885,10 @@ function handleEditorClose(evt) {
delete evt.target.data.editor;
}
}).catch(processCefError);
} else {
/* Don't need to record changes, but still need to notify C++ side that
the editor has been closed. */
loot.query('editorClosed').catch(processCefError);
}
/* Now hide editor. */
+8
View File
@@ -176,6 +176,14 @@ namespace loot {
callback->Success("");
return true;
}
else if (request == "editorClosed") {
// This version of the editorClosed query has no arguments as it is
// sent when editing is cancelled. Just update the unapplied changes
// counter.
--g_app_state.numUnappliedChanges;
callback->Success("");
return true;
}
else {
// May be a request with arguments.
YAML::Node req;