1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

Fix toolbar resizers being in tab traversal

In commit 89e33da, the override of AcceptsFocus() was removed from the ToolBarResizer class so that ESC could cancel resizing. However this meant that the toolbar resizers were included in the tab traversal of the toolbars.

The fix is the same one that was used to fix the problem with the toolbar grabbers being in the tab traversal: override AcceptsFocusFromKeyboard(), rather than AcceptsFocus().
This commit is contained in:
David Bailes 2016-06-14 14:18:44 +01:00
parent dfa91655d3
commit b011fc4c6b

View File

@ -68,8 +68,9 @@ public:
virtual ~ToolBarResizer();
// We don't need or want to accept focus.
// PRL: except for ESC key now.
// bool AcceptsFocus() const;
// Note that AcceptsFocusFromKeyboard() is overriden rather than
// AcceptsFocus(), so that resize can be cancelled by ESC
bool AcceptsFocusFromKeyboard() const override {return false;}
private:
void OnErase(wxEraseEvent & event);
@ -117,13 +118,6 @@ ToolBarResizer::~ToolBarResizer()
ReleaseMouse();
}
/*
bool ToolBarResizer::AcceptsFocus() const
{
return false;
}
*/
//
// Handle background erasure
//