From: Vadim Zeitlin Date: Thu, 29 Mar 2012 23:43:43 +0000 (+0000) Subject: Restore the correct brush in wxGCDC::GradientFill() methods. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/be6b31f34fe03bc7ce708a8c4b077e41ac2f1362 Restore the correct brush in wxGCDC::GradientFill() methods. Both GradientFillLinear() and GradientFillConcentric() changed the brush on the underlying wxGraphicsContext but didn't restore the default brush back. Closes #14131. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 2e57a41a2c..e7626dfa0b 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -1147,6 +1147,7 @@ void wxGCDCImpl::DoGradientFillLinear(const wxRect& rect, m_graphicContext->SetPen(*wxTRANSPARENT_PEN); m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); m_graphicContext->SetPen(m_pen); + m_graphicContext->SetBrush(m_brush); } void wxGCDCImpl::DoGradientFillConcentric(const wxRect& rect, @@ -1175,6 +1176,7 @@ void wxGCDCImpl::DoGradientFillConcentric(const wxRect& rect, m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); m_graphicContext->SetPen(m_pen); + m_graphicContext->SetBrush(m_brush); } void wxGCDCImpl::DoDrawCheckMark(wxCoord x, wxCoord y,