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_DISP("Exit")
|
||||||
STR_HELP("Exit the application")
|
STR_HELP("Exit the application")
|
||||||
|
|
||||||
void operator()(agi::Context *c) override {
|
void operator()(agi::Context *) override {
|
||||||
c->frame->Close();
|
wxGetApp().CloseAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -379,6 +379,13 @@ agi::Context& AegisubApp::NewProjectContext() {
|
||||||
return *frame->context;
|
return *frame->context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AegisubApp::CloseAll() {
|
||||||
|
for (auto frame : frames) {
|
||||||
|
if (!frame->Close())
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AegisubApp::UnhandledException(bool stackWalk) {
|
void AegisubApp::UnhandledException(bool stackWalk) {
|
||||||
#if (!defined(_DEBUG) || defined(WITH_EXCEPTIONS)) && (wxUSE_ON_FATAL_EXCEPTION+0)
|
#if (!defined(_DEBUG) || defined(WITH_EXCEPTIONS)) && (wxUSE_ON_FATAL_EXCEPTION+0)
|
||||||
bool any = false;
|
bool any = false;
|
||||||
|
|
|
@ -63,6 +63,7 @@ public:
|
||||||
AegisubLocale locale;
|
AegisubLocale locale;
|
||||||
|
|
||||||
agi::Context& NewProjectContext();
|
agi::Context& NewProjectContext();
|
||||||
|
void CloseAll();
|
||||||
|
|
||||||
// Apple events
|
// Apple events
|
||||||
void MacOpenFiles(wxArrayString const& filenames)
|
void MacOpenFiles(wxArrayString const& filenames)
|
||||||
|
|
Loading…
Reference in a new issue