mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-26 17:18:41 +02:00
Manage Macros dialog: a couple of focus issues
1. For both the macros list and the steps list, when focus first moves to the list, an item is selected but not the focus. 2. After editing a step, focus is not returned to that step in the list. Fix for 1: in the calls of SetItemState(), include the wxLIST_STATE_FOCUSED flag. Fix for 2: The fix for 1 fixed 2. Not sure why.
This commit is contained in:
parent
9d396e3315
commit
4bf28412db
@ -185,7 +185,8 @@ void ApplyMacroDialog::PopulateMacros()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Select the name in the list...this will fire an event.
|
// Select the name in the list...this will fire an event.
|
||||||
mMacros->SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
mMacros->SetItemState(item, wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
|
||||||
|
wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED);
|
||||||
|
|
||||||
if( 0 <= topItem && topItem < (int)mMacros->GetItemCount())
|
if( 0 <= topItem && topItem < (int)mMacros->GetItemCount())
|
||||||
{
|
{
|
||||||
@ -703,7 +704,9 @@ void MacrosWindow::PopulateList()
|
|||||||
if (mSelectedCommand >= (int)mList->GetItemCount()) {
|
if (mSelectedCommand >= (int)mList->GetItemCount()) {
|
||||||
mSelectedCommand = 0;
|
mSelectedCommand = 0;
|
||||||
}
|
}
|
||||||
mList->SetItemState(mSelectedCommand, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
mList->SetItemState(mSelectedCommand,
|
||||||
|
wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
|
||||||
|
wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED);
|
||||||
if( 0 <= topItem && topItem < (int)mList->GetItemCount())
|
if( 0 <= topItem && topItem < (int)mList->GetItemCount())
|
||||||
{
|
{
|
||||||
// Workaround for scrolling being windows only.
|
// Workaround for scrolling being windows only.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user