mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-28 14:18:41 +02:00
Corrects the crash in when tabbing into an empty rule table.
Also converts file from CRLF to LF.
This commit is contained in:
parent
ad27d2a297
commit
c226ae9265
@ -371,7 +371,11 @@ void ExtImportPrefs::OnRuleTableSelect (wxGridEvent& event)
|
||||
event.Skip();
|
||||
if (!event.Selecting() || mStopRecursiveSelection)
|
||||
return;
|
||||
|
||||
toprow = event.GetRow();
|
||||
if (toprow < 0)
|
||||
return;
|
||||
|
||||
DoOnRuleTableSelect (toprow);
|
||||
}
|
||||
|
||||
@ -381,7 +385,11 @@ void ExtImportPrefs::OnRuleTableSelectRange (wxGridRangeSelectEvent& event)
|
||||
event.Skip();
|
||||
if (!event.Selecting() || mStopRecursiveSelection)
|
||||
return;
|
||||
|
||||
toprow = event.GetTopRow();
|
||||
if (toprow < 0)
|
||||
return;
|
||||
|
||||
DoOnRuleTableSelect (toprow);
|
||||
mStopRecursiveSelection = true;
|
||||
RuleTable->SelectRow (toprow);
|
||||
@ -392,6 +400,12 @@ void ExtImportPrefs::OnRuleTableSelectRange (wxGridRangeSelectEvent& event)
|
||||
void ExtImportPrefs::DoOnRuleTableSelect (int toprow)
|
||||
{
|
||||
ExtImportItems *items = wxGetApp().mImporter->GetImportItems();
|
||||
|
||||
if (toprow < 0 || toprow > items->GetCount())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ExtImportItem *item = &(*items)[toprow];
|
||||
PluginList->DeleteAllItems();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user