- inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
- inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
+ inline bool operator == (const wxPen& pen) const
+ {
+ // It is impossible to know if the user dashes have changed,
+ // so we must assume that they have
+ if ( m_refData && pen.m_refData )
+ {
+ if ( M_PENDATA->m_nbDash != 0 || wxPENDATA(pen)->m_nbDash != 0 )
+ return false;
+ }
+ return m_refData == pen.m_refData;
+ }
+ inline bool operator != (const wxPen& pen) const
+ {
+ // It is impossible to know if the user dashes have changed,
+ // so we must assume that they have
+ if ( m_refData && pen.m_refData )
+ {
+ if ( M_PENDATA->m_nbDash != 0 || wxPENDATA(pen)->m_nbDash != 0 )
+ return true;
+ }
+ return m_refData != pen.m_refData;
+ }