Actually close all windows on quit
This commit is contained in:
parent
84b0f1e043
commit
ead12de8b6
3 changed files with 10 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -63,6 +63,7 @@ public:
|
|||
AegisubLocale locale;
|
||||
|
||||
agi::Context& NewProjectContext();
|
||||
void CloseAll();
|
||||
|
||||
// Apple events
|
||||
void MacOpenFiles(wxArrayString const& filenames)
|
||||
|
|
Loading…
Reference in a new issue