From 38274d1de33ff44ec96dbb2c7d6942cb85882a82 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 17 Apr 2012 16:57:12 +0000 Subject: [PATCH] avoiding potential mismatch between true and expected state of wxGraphicsContext because it might have been changed through its direct API meanwhile, fixes #14226 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dcgraph.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index e7626dfa0b..427ef4ab31 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -385,7 +385,7 @@ void wxGCDCImpl::SetTextForeground( const wxColour &col ) // don't set m_textForegroundColour to an invalid colour as we'd crash // later then (we use m_textForegroundColour.GetColor() without checking // in a few places) - if ( col.IsOk() && col != m_textForegroundColour ) + if ( col.IsOk() ) { m_textForegroundColour = col; m_graphicContext->SetFont( m_font, m_textForegroundColour ); @@ -481,9 +481,6 @@ void wxGCDCImpl::SetFont( const wxFont &font ) void wxGCDCImpl::SetPen( const wxPen &pen ) { - if ( m_pen == pen ) - return; - m_pen = pen; if ( m_graphicContext ) { @@ -493,9 +490,6 @@ void wxGCDCImpl::SetPen( const wxPen &pen ) void wxGCDCImpl::SetBrush( const wxBrush &brush ) { - if (m_brush == brush) - return; - m_brush = brush; if ( m_graphicContext ) { @@ -505,9 +499,6 @@ void wxGCDCImpl::SetBrush( const wxBrush &brush ) void wxGCDCImpl::SetBackground( const wxBrush &brush ) { - if (m_backgroundBrush == brush) - return; - m_backgroundBrush = brush; if (!m_backgroundBrush.IsOk()) return; @@ -515,9 +506,6 @@ void wxGCDCImpl::SetBackground( const wxBrush &brush ) void wxGCDCImpl::SetLogicalFunction( wxRasterOperationMode function ) { - if (m_logicalFunction == function) - return; - m_logicalFunction = function; wxCompositionMode mode = TranslateRasterOp( function ); -- 2.45.2