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

Method DoCancel

src/effects/EffectUI.cpp:608–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608void EffectUIHost::DoCancel()
609{
610 if (!mDismissed) {
611 if (!mHadPriorState) {
612 // For the destructive effect dialog only
613 // Restore effect state from last updated preferences
614 mpAccess->ModifySettings([&](EffectSettings &settings) {
615 // ignore failure
616 return mEffectUIHost.GetDefinition().LoadUserPreset(
617 CurrentSettingsGroup(), settings).value_or(nullptr);
618 });
619 }
620 if (IsModal())
621 EndModal(0);
622 else
623 Hide();
624
625 mDismissed = true;
626 }
627}
628
629void EffectUIHost::OnCancel(wxCommandEvent & WXUNUSED(evt))
630{

Callers

nothing calls this directly

Calls 1

LoadUserPresetMethod · 0.45

Tested by

no test coverage detected