1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-05 16:43:52 +01:00

Fix for refresh issue on several preference panes

See bug #2315, but this should be review and removed
after moving to wx3.1.3.
This commit is contained in:
Leland Lucius
2020-02-25 09:18:51 -06:00
parent b23d98fd05
commit e994141c5f
6 changed files with 51 additions and 1 deletions

View File

@@ -65,8 +65,11 @@ ExtImportPrefs::ExtImportPrefs(wxWindow * parent, wxWindowID winid)
mFakeKeyEvent (false), mStopRecursiveSelection (false), last_selected (-1)
{
Populate();
}
// See bug #2315 for discussion
// This should be reviewed and (possibly) removed after wx3.1.3.
Bind(wxEVT_SHOW, &ExtImportPrefs::OnShow, this);
}
ExtImportPrefs::~ExtImportPrefs()
{
}
@@ -213,6 +216,16 @@ bool ExtImportPrefs::Commit()
return true;
}
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
void ExtImportPrefs::OnShow(wxShowEvent &event)
{
event.Skip();
RuleTable->Refresh();
PluginList->Refresh();
}
void ExtImportPrefs::OnPluginKeyDown(wxListEvent& event)
{
for (int i = 0; i < 1; i++)

View File

@@ -58,6 +58,10 @@ class ExtImportPrefs final : public PrefsPanel
wxString HelpPageName() override;
void PopulateOrExchange(ShuttleGui & S) override;
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
void OnShow(wxShowEvent& event);
void OnPluginKeyDown(wxListEvent& event);
void OnPluginBeginDrag(wxListEvent& event);
void OnRuleTableKeyDown(wxKeyEvent& event);

View File

@@ -102,6 +102,10 @@ KeyConfigPrefs::KeyConfigPrefs(
auto index = mView->GetIndexByName(name);
mView->SelectNode(index);
}
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
Bind(wxEVT_SHOW, &KeyConfigPrefs::OnShow, this);
}
ComponentInterfaceSymbol KeyConfigPrefs::GetSymbol()
@@ -459,6 +463,15 @@ TranslatableString KeyConfigPrefs::MergeWithExistingKeys(
return disabledShortcuts;
}
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
void KeyConfigPrefs::OnShow(wxShowEvent & event)
{
event.Skip();
mView->Refresh();
}
void KeyConfigPrefs::OnImport(wxCommandEvent & WXUNUSED(event))
{
wxString file = wxT("Audacity-keys.xml");

View File

@@ -56,6 +56,10 @@ private:
CommandID NameFromKey(const NormalizedKeyString & key);
void SetKeyForSelected(const NormalizedKeyString & key);
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
void OnShow(wxShowEvent & e);
void OnViewBy(wxCommandEvent & e);
void OnDefaults(wxCommandEvent & e);
void OnImportDefaults(wxCommandEvent & e);

View File

@@ -64,6 +64,10 @@ MousePrefs::MousePrefs(wxWindow * parent, wxWindowID winid)
: PrefsPanel(parent, winid, XO("Mouse"))
{
Populate();
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
Bind(wxEVT_SHOW, &MousePrefs::OnShow, this);
}
MousePrefs::~MousePrefs()
@@ -211,6 +215,14 @@ void MousePrefs::AddItem(
mList->SetItem(i, CommentColumn, wxT(" ") + comment.Translation());
}
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
void MousePrefs::OnShow(wxShowEvent &event)
{
event.Skip();
mList->Refresh();
}
/// Update the preferences stored on disk.
/// Currently does nothing as Mouse Preferences don't change.

View File

@@ -39,6 +39,10 @@ class MousePrefs final : public PrefsPanel
TranslatableString const & action,
TranslatableString const & comment = {});
// See bug #2315 for discussion. This should be reviewed
// and (possibly) removed after wx3.1.3.
void OnShow(wxShowEvent & event);
wxListCtrl * mList;
};