mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
ExtImport: don't let user select multiple rules at once
While selection with Shift+Up/Down is still possible, it will only last until Shift is released.
This commit is contained in:
parent
fce76e9f46
commit
6151d3d4e2
@ -58,7 +58,7 @@ END_EVENT_TABLE()
|
||||
ExtImportPrefs::ExtImportPrefs(wxWindow * parent)
|
||||
: PrefsPanel(parent, _("Extended Import")), RuleTable(NULL),
|
||||
PluginList(NULL), mCreateTable (false), mDragFocus (NULL),
|
||||
last_selected (-1), mFakeKeyEvent (false)
|
||||
last_selected (-1), mFakeKeyEvent (false), mStopRecursiveSelection (false)
|
||||
{
|
||||
dragtext1 = new wxTextDataObject(wxT(""));
|
||||
dragtext2 = new wxTextDataObject(wxT(""));
|
||||
@ -369,21 +369,25 @@ void ExtImportPrefs::DoOnRuleTableKeyDown (int keycode)
|
||||
void ExtImportPrefs::OnRuleTableSelect (wxGridEvent& event)
|
||||
{
|
||||
int toprow;
|
||||
if (!event.Selecting())
|
||||
event.Skip();
|
||||
if (!event.Selecting() || mStopRecursiveSelection)
|
||||
return;
|
||||
toprow = event.GetRow();
|
||||
DoOnRuleTableSelect (toprow);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void ExtImportPrefs::OnRuleTableSelectRange (wxGridRangeSelectEvent& event)
|
||||
{
|
||||
int toprow;
|
||||
if (!event.Selecting())
|
||||
event.Skip();
|
||||
if (!event.Selecting() || mStopRecursiveSelection)
|
||||
return;
|
||||
toprow = event.GetTopRow();
|
||||
DoOnRuleTableSelect (toprow);
|
||||
event.Skip();
|
||||
mStopRecursiveSelection = true;
|
||||
RuleTable->SelectRow (toprow);
|
||||
mStopRecursiveSelection = false;
|
||||
RuleTable->SetGridCursor (toprow, 0);
|
||||
}
|
||||
|
||||
void ExtImportPrefs::DoOnRuleTableSelect (int toprow)
|
||||
|
@ -93,6 +93,7 @@ class ExtImportPrefs:public PrefsPanel
|
||||
bool mCreateTable;
|
||||
wxWindow *mDragFocus;
|
||||
bool mFakeKeyEvent;
|
||||
bool mStopRecursiveSelection;
|
||||
|
||||
int last_selected;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user