MCPcopy Create free account
hub / github.com/audacity/audacity / OnClose

Method OnClose

libraries/lib-wx-init/HelpSystem.cpp:466–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466void BrowserDialog::OnClose(wxCommandEvent & WXUNUSED(event))
467{
468 if (IsModal() && !mDismissed)
469 {
470 mDismissed = true;
471 EndModal(wxID_CANCEL);
472 }
473 auto parent = GetParent();
474
475 gPrefs->Write(wxT("/GUI/BrowserWidth"), GetSize().GetX());
476 gPrefs->Write(wxT("/GUI/BrowserHeight"), GetSize().GetY());
477 gPrefs->Flush();
478
479#ifdef __WXMAC__
480 auto grandparent = GetParent()->GetParent();
481#endif
482
483 parent->Destroy();
484
485#ifdef __WXMAC__
486 if(grandparent && grandparent->IsShown()) {
487 grandparent->Raise();
488 }
489#endif
490}
491
492void BrowserDialog::OnKeyDown(wxKeyEvent & event)
493{

Callers

nothing calls this directly

Calls 7

GetParentFunction · 0.85
IsShownMethod · 0.80
RaiseMethod · 0.80
WriteMethod · 0.45
FlushMethod · 0.45
GetParentMethod · 0.45
DestroyMethod · 0.45

Tested by

no test coverage detected