1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-17 16:50:26 +02:00

Bug 1723 - Keyboard Preferences: Closing subtrees.

Closing sub trees can leave the wrong item selected.
If a node near the bottom of the tree is closed, the node may move
down, and no longer be under the mouse pointer. If further processing
is allowed, then the line at the mouse position is incorrectly selected.

Fix: Don't allow further processing and call SetFocus() ourselves.
This commit is contained in:
David Bailes 2019-07-30 11:26:46 +01:00
parent aac2b7d825
commit 5b277dc9f8

View File

@ -1656,6 +1656,14 @@ KeyView::OnLeftDown(wxMouseEvent & event)
// And make sure current line is still selected // And make sure current line is still selected
SelectNode(LineToIndex(line)); SelectNode(LineToIndex(line));
// If a node is closed near the bottom of the tree,
// the node may move down, and no longer be at the
// mouse pointer position. So don't allow further processing as this
// selects the line at the mouse position. Bug 1723.
// So we need to set the focus.
SetFocus();
return;
} }
} }