1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-30 07:08:39 +02:00

Oops...sorting command names is not the same as sorting command labels.

Thanks Martyn.
This commit is contained in:
lllucius 2013-09-25 01:43:27 +00:00
parent 5ec256a6fc
commit 6ccaf15a3c
2 changed files with 8 additions and 5 deletions

View File

@ -217,7 +217,7 @@ void KeyConfigPrefs::Sort(int column)
switch(column)
{
case CommandColumn:
data = &mNames;
data = &mLabels;
break;
case KeyComboColumn:
data = &mKeys;
@ -240,6 +240,7 @@ void KeyConfigPrefs::RepopulateBindingsList()
mList->DeleteAllItems(); // Delete contents, but not the column headers.
mNames.Clear();
mLabels.Clear();
mDefaultKeys.Clear();
wxArrayString Keys,Labels,Categories;
@ -270,10 +271,6 @@ void KeyConfigPrefs::RepopulateBindingsList()
else
mNewKeys[i] = key; // Make sure mNewKeys is updated.
// if (cat != _("All") && ! Categories[i].StartsWith(cat)) {
if (cat != _("All") && ! (Categories[i]== cat)) {
continue;
}
wxString label;
// Labels for undo and redo change according to the last command
@ -290,7 +287,12 @@ void KeyConfigPrefs::RepopulateBindingsList()
}
label = wxMenuItem::GetLabelFromText(label.BeforeFirst(wxT('\t')));
mLabels.Add(label);
// if (cat != _("All") && ! Categories[i].StartsWith(cat)) {
if (cat != _("All") && ! (Categories[i] == cat)) {
continue;
}
mList->InsertItem(ndx, label);
mList->SetItem(ndx, KeyComboColumn, key);
mList->SetItemData(ndx, i);

View File

@ -63,6 +63,7 @@ private:
wxArrayString mCats;
wxArrayString mNames;
wxArrayString mLabels;
wxArrayString mDefaultKeys;
wxArrayString mKeys;
wxArrayString mNewKeys; // Used for work in progress.