From c18ac572dba92039e133a42a5412b4541a315edd Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 25 Feb 2002 10:19:11 +0000 Subject: [PATCH] Corrected typos git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/toolbar.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index cceff8c475..fea3ac064c 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -91,16 +91,16 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable) { // Created disabled-state bitmap on demand - if (!enable && !m_bitmap2.Ok()) + if (!enable && !tool->GetBitmap2().Ok()) { - wxImage in(m_bitmap1); - wxImage out(m_bitmap1); + wxImage in(tool->GetBitmap1()); + wxImage out(tool->GetBitmap1()); wxCreateGreyedImage(in, out); - m_bitmap2 = out.ConvertToBitmap(); + tool->SetBitmap2(out.ConvertToBitmap()); } - RefreshTool(tool); + RefreshTool((wxToolBarTool*) tool); } void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool toggle) @@ -146,7 +146,7 @@ void wxToolBar::RefreshTool( wxToolBarTool *tool ) void wxToolBar::DrawToolBarTool( wxToolBarTool *tool, wxDC &dc, bool down ) { - wxBitmap& bitmap = (tool->IsEnabled() || !tool->GetBitmap1().Ok()) ? tool->GetBitmap1() : tool->GetBitmap2() ; + const wxBitmap& bitmap = (tool->IsEnabled() || !tool->GetBitmap1().Ok()) ? tool->GetBitmap1() : tool->GetBitmap2() ; if (down) { dc.DrawBitmap( bitmap, tool->m_x+4, tool->m_y+4, TRUE ); @@ -304,7 +304,7 @@ void wxToolBar::OnMouse(wxMouseEvent &event) } } - if (event.LeftDown() && (hit) && hit->Enabled()) + if (event.LeftDown() && (hit) && hit->IsEnabled()) { CaptureMouse(); m_captured = hit;