Fix m_qtPainter not being initialised in wxCairoContext ctor
For some reason one of the overloads of the c'tor left the m_qtPainter field set to NULL rather than asking the wxDC for it's painter. The rest of the class assumes the painter is not NULL. Closes https://github.com/wxWidgets/wxWidgets/pull/1075
This commit is contained in:
committed by
Vadim Zeitlin
parent
db15e99884
commit
8fa32a40a9
@@ -1869,7 +1869,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WXQT__
|
#ifdef __WXQT__
|
||||||
m_qtPainter = (QPainter*) dc.GetHandle();
|
m_qtPainter = static_cast<QPainter*>(dc.GetHandle());
|
||||||
// create a internal buffer (fallback if cairo_qt_surface is missing)
|
// create a internal buffer (fallback if cairo_qt_surface is missing)
|
||||||
m_qtImage = new QImage(width, height, QImage::Format_ARGB32_Premultiplied);
|
m_qtImage = new QImage(width, height, QImage::Format_ARGB32_Premultiplied);
|
||||||
// clear the buffer to be painted over the current contents
|
// clear the buffer to be painted over the current contents
|
||||||
@@ -2084,7 +2084,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC&
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WXQT__
|
#ifdef __WXQT__
|
||||||
m_qtPainter = NULL;
|
m_qtPainter = static_cast<QPainter*>(dc.GetHandle());
|
||||||
// create a internal buffer (fallback if cairo_qt_surface is missing)
|
// create a internal buffer (fallback if cairo_qt_surface is missing)
|
||||||
m_qtImage = new QImage(width, height, QImage::Format_ARGB32_Premultiplied);
|
m_qtImage = new QImage(width, height, QImage::Format_ARGB32_Premultiplied);
|
||||||
// clear the buffer to be painted over the current contents
|
// clear the buffer to be painted over the current contents
|
||||||
|
Reference in New Issue
Block a user