Revert HasModifiers() change in behaviour, add HasAnyModifiers().
In 2.8 wxKeyEvent::HasModifiers() returned false if (only) Shift was pressed as it tested for Control and Alt only but when it was moved to wxKeyboardState in r55745 it started checking for all modifiers as this made more sense now that it was used by wxMouseEvent. However it broke existing code using it, including in wxWidgets itself (in wxTreeCtrl), so revert it now and add HasAnyModifiers() that does check for all modifiers, including Shift. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,7 +55,14 @@ public:
|
||||
}
|
||||
|
||||
// returns true if any modifiers at all are pressed
|
||||
bool HasModifiers() const { return GetModifiers() != wxMOD_NONE; }
|
||||
bool HasAnyModifiers() const { return GetModifiers() != wxMOD_NONE; }
|
||||
|
||||
// returns true if any modifiers changing the usual key interpretation are
|
||||
// pressed, notably excluding Shift
|
||||
bool HasModifiers() const
|
||||
{
|
||||
return ControlDown() || RawControlDown() || AltDown();
|
||||
}
|
||||
|
||||
// accessors for individual modifier keys
|
||||
bool ControlDown() const { return m_controlDown; }
|
||||
|
Reference in New Issue
Block a user