X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..0441868f0826077c1412a9828e5f3e67f32c425d:/include/wx/tbarbase.h diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index 8eb5f22af4..3aa70ce99d 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -420,7 +420,7 @@ public: wxToolBarToolBase *FindById(int toolid) const; // return true if this is a vertical toolbar, otherwise false - bool IsVertical() const { return HasFlag(wxTB_VERTICAL); } + bool IsVertical() const { return HasFlag(wxTB_LEFT | wxTB_RIGHT); } // the old versions of the various methods kept for compatibility @@ -564,6 +564,13 @@ protected: // helper functions // ---------------- + // call this from derived class ctor/Create() to ensure that we have either + // wxTB_HORIZONTAL or wxTB_VERTICAL style, there is a lot of existing code + // which randomly checks either one or the other of them and gets confused + // if neither is set (and making one of them 0 is not an option neither as + // then the existing tests would break down) + void FixupStyle(); + // un-toggle all buttons in the same radio group void UnToggleRadioGroup(wxToolBarToolBase *tool);