1
0
Fork 0

Actually close all windows on quit

This commit is contained in:
Thomas Goyne 2015-08-30 18:18:07 -07:00
parent 84b0f1e043
commit ead12de8b6
3 changed files with 10 additions and 2 deletions

View File

@ -145,8 +145,8 @@ struct app_exit final : public Command {
STR_DISP("Exit")
STR_HELP("Exit the application")
void operator()(agi::Context *c) override {
c->frame->Close();
void operator()(agi::Context *) override {
wxGetApp().CloseAll();
}
};

View File

@ -379,6 +379,13 @@ agi::Context& AegisubApp::NewProjectContext() {
return *frame->context;
}
void AegisubApp::CloseAll() {
for (auto frame : frames) {
if (!frame->Close())
break;
}
}
void AegisubApp::UnhandledException(bool stackWalk) {
#if (!defined(_DEBUG) || defined(WITH_EXCEPTIONS)) && (wxUSE_ON_FATAL_EXCEPTION+0)
bool any = false;

View File

@ -63,6 +63,7 @@ public:
AegisubLocale locale;
agi::Context& NewProjectContext();
void CloseAll();
// Apple events
void MacOpenFiles(wxArrayString const& filenames)