diff --git a/src/ribbon/toolbar.cpp b/src/ribbon/toolbar.cpp index 2002fe1bc5..2e49fd7ce0 100644 --- a/src/ribbon/toolbar.cpp +++ b/src/ribbon/toolbar.cpp @@ -439,7 +439,7 @@ wxRibbonToolBarToolBase* wxRibbonToolBar::GetToolByPos(wxCoord x, wxCoord y)cons for ( size_t t = 0; t < tool_count; ++t ) { wxRibbonToolBarToolBase* tool = group->tools.Item(t); - wxRect rect(tool->position + group->position, tool->size); + wxRect rect(group->position + tool->position, tool->size); if(rect.Contains(x, y)) { return tool; @@ -535,7 +535,7 @@ wxRect wxRibbonToolBar::GetToolRect(int tool_id)const wxRibbonToolBarToolBase* tool = group->tools.Item(t); if (tool->id == tool_id) { - return wxRect(tool->position + group->position, tool->size); + return wxRect(group->position + tool->position, tool->size); } ++pos; }