1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-23 15:02:56 +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(); virtual ~ToolBarResizer();
// We don't need or want to accept focus. // We don't need or want to accept focus.
// PRL: except for ESC key now. // Note that AcceptsFocusFromKeyboard() is overriden rather than
// bool AcceptsFocus() const; // AcceptsFocus(), so that resize can be cancelled by ESC
bool AcceptsFocusFromKeyboard() const override {return false;}
private: private:
void OnErase(wxEraseEvent & event); void OnErase(wxEraseEvent & event);
@@ -117,13 +118,6 @@ ToolBarResizer::~ToolBarResizer()
ReleaseMouse(); ReleaseMouse();
} }
/*
bool ToolBarResizer::AcceptsFocus() const
{
return false;
}
*/
// //
// Handle background erasure // Handle background erasure
// //