Applied #10079: wxAuiToolBar: Allow right-click on any kind of button
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2497,8 +2497,6 @@ void wxAuiToolBar::OnRightUp(wxMouseEvent& evt)
|
|||||||
hit_item = FindToolByPosition(evt.GetX(), evt.GetY());
|
hit_item = FindToolByPosition(evt.GetX(), evt.GetY());
|
||||||
|
|
||||||
if (m_action_item && hit_item == m_action_item)
|
if (m_action_item && hit_item == m_action_item)
|
||||||
{
|
|
||||||
if (hit_item->kind == wxITEM_NORMAL)
|
|
||||||
{
|
{
|
||||||
wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, m_action_item->id);
|
wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, m_action_item->id);
|
||||||
e.SetEventObject(this);
|
e.SetEventObject(this);
|
||||||
@@ -2507,7 +2505,6 @@ void wxAuiToolBar::OnRightUp(wxMouseEvent& evt)
|
|||||||
ProcessEvent(e);
|
ProcessEvent(e);
|
||||||
DoIdleUpdate();
|
DoIdleUpdate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// right-clicked on the invalid area of the toolbar
|
// right-clicked on the invalid area of the toolbar
|
||||||
|
Reference in New Issue
Block a user