mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fixed cancelling editor panels preventing LOOT closure.
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user