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();
|
event.Skip();
|
||||||
if (!event.Selecting() || mStopRecursiveSelection)
|
if (!event.Selecting() || mStopRecursiveSelection)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
toprow = event.GetRow();
|
toprow = event.GetRow();
|
||||||
|
if (toprow < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
DoOnRuleTableSelect (toprow);
|
DoOnRuleTableSelect (toprow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,7 +385,11 @@ void ExtImportPrefs::OnRuleTableSelectRange (wxGridRangeSelectEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
if (!event.Selecting() || mStopRecursiveSelection)
|
if (!event.Selecting() || mStopRecursiveSelection)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
toprow = event.GetTopRow();
|
toprow = event.GetTopRow();
|
||||||
|
if (toprow < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
DoOnRuleTableSelect (toprow);
|
DoOnRuleTableSelect (toprow);
|
||||||
mStopRecursiveSelection = true;
|
mStopRecursiveSelection = true;
|
||||||
RuleTable->SelectRow (toprow);
|
RuleTable->SelectRow (toprow);
|
||||||
@ -392,6 +400,12 @@ void ExtImportPrefs::OnRuleTableSelectRange (wxGridRangeSelectEvent& event)
|
|||||||
void ExtImportPrefs::DoOnRuleTableSelect (int toprow)
|
void ExtImportPrefs::DoOnRuleTableSelect (int toprow)
|
||||||
{
|
{
|
||||||
ExtImportItems *items = wxGetApp().mImporter->GetImportItems();
|
ExtImportItems *items = wxGetApp().mImporter->GetImportItems();
|
||||||
|
|
||||||
|
if (toprow < 0 || toprow > items->GetCount())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ExtImportItem *item = &(*items)[toprow];
|
ExtImportItem *item = &(*items)[toprow];
|
||||||
PluginList->DeleteAllItems();
|
PluginList->DeleteAllItems();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user