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

Method ReloadEffectsList

src/RealtimeEffectPanel.cpp:1045–1073  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1043 }
1044
1045 void ReloadEffectsList()
1046 {
1047 wxWindowUpdateLocker freeze(this);
1048
1049 //delete items that were added to the sizer
1050 mEffectListContainer->Hide();
1051 mEffectListContainer->GetSizer()->Clear(true);
1052
1053
1054 if(!mDelegate || mDelegate->GetEffectList().GetStatesCount() == 0)
1055 mEffectListContainer->Hide();
1056
1057 auto isEmpty{true};
1058 if(mDelegate)
1059 {
1060 auto& effects = mDelegate->GetEffectList();
1061 isEmpty = effects.GetStatesCount() == 0;
1062 for(size_t i = 0, count = effects.GetStatesCount(); i < count; ++i)
1063 InsertEffectRow(i, effects.GetStateAt(i));
1064 }
1065 mAddEffect->SetEnabled(!!mDelegate);
1066 //Workaround for GTK: Underlying GTK widget does not update
1067 //its size when wxWindow size is set to zero
1068 mEffectListContainer->Show(!isEmpty);
1069 if(mFooter != nullptr)
1070 mFooter->Show(isEmpty);
1071
1072 SendSizeEventToParent();
1073 }
1074
1075 void OnAddEffectClicked(const wxCommandEvent& event)
1076 {

Callers

nothing calls this directly

Calls 7

GetSizerMethod · 0.80
GetStatesCountMethod · 0.80
GetStateAtMethod · 0.80
HideMethod · 0.45
ClearMethod · 0.45
SetEnabledMethod · 0.45
ShowMethod · 0.45

Tested by

no test coverage detected