From 93aeca9a48cb422987fafbdfb7764c6af789d6cb Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Wed, 16 Sep 2015 13:08:03 -0500 Subject: [PATCH] Fix for bug #1203 --- src/toolbars/ToolBar.h | 2 ++ src/toolbars/ToolDock.h | 2 ++ src/widgets/AButton.h | 3 +++ src/widgets/Meter.h | 3 +++ src/widgets/Ruler.h | 2 ++ 5 files changed, 12 insertions(+) diff --git a/src/toolbars/ToolBar.h b/src/toolbars/ToolBar.h index e88b6ace7..51df2f0c7 100644 --- a/src/toolbars/ToolBar.h +++ b/src/toolbars/ToolBar.h @@ -87,6 +87,8 @@ class ToolBar:public wxPanel ToolBar(int type, const wxString & label, const wxString & section, bool resizable = false); virtual ~ToolBar(); + virtual bool AcceptsFocus() const { return false; }; + virtual void Create(wxWindow *parent); virtual void EnableDisableButtons() = 0; virtual void ReCreateButtons(); diff --git a/src/toolbars/ToolDock.h b/src/toolbars/ToolDock.h index d0146e25a..44e60acca 100644 --- a/src/toolbars/ToolDock.h +++ b/src/toolbars/ToolDock.h @@ -53,6 +53,8 @@ class ToolDock:public wxPanel ToolDock( ToolManager *manager, wxWindow *parent, int dockid ); ~ToolDock(); + virtual bool AcceptsFocus() const { return false; }; + void LayoutToolBars(); void Expose( int type, bool show ); int GetOrder( ToolBar *bar ); diff --git a/src/widgets/AButton.h b/src/widgets/AButton.h index d498edb6b..026f700c7 100644 --- a/src/widgets/AButton.h +++ b/src/widgets/AButton.h @@ -56,6 +56,9 @@ class AButton: public wxWindow { virtual ~ AButton(); + virtual bool AcceptsFocus() const { return false; }; + virtual bool AcceptsFocusFromKeyboard() const { return true; }; + // Associate a set of four images (button up, highlight, button down, // disabled) with one nondefault state of the button virtual void SetAlternateImages(unsigned idx, diff --git a/src/widgets/Meter.h b/src/widgets/Meter.h index 55bfd7fa2..c5d3a442b 100644 --- a/src/widgets/Meter.h +++ b/src/widgets/Meter.h @@ -113,6 +113,9 @@ class Meter : public wxPanel ~Meter(); + virtual bool AcceptsFocus() const { return false; }; + virtual bool AcceptsFocusFromKeyboard() const { return true; }; + void UpdatePrefs(); void Clear(); diff --git a/src/widgets/Ruler.h b/src/widgets/Ruler.h index 54bc3a98d..a0bf1dbbc 100644 --- a/src/widgets/Ruler.h +++ b/src/widgets/Ruler.h @@ -282,6 +282,8 @@ public: ~AdornedRulerPanel(); + virtual bool AcceptsFocus() const { return false; }; + public: static int GetRulerHeight() { return 28; } void SetLeftOffset(int offset);