Don't use desktop in wxQtMeasuringContext

This doesn't work, so create a new QPainter instead.
This commit is contained in:
Jay Nabonne
2019-01-21 13:49:02 +00:00
committed by Vadim Zeitlin
parent 613513501b
commit a5174c7483

View File

@@ -654,6 +654,13 @@ public:
#endif #endif
wxQtGraphicsContext(wxGraphicsRenderer* renderer, QPainter* painter, bool ownsPainter = true)
: wxGraphicsContext(renderer),
m_qtPainter(painter),
m_ownsPainter(ownsPainter)
{
}
wxQtGraphicsContext(wxGraphicsRenderer* renderer, wxWindow *window) wxQtGraphicsContext(wxGraphicsRenderer* renderer, wxWindow *window)
: wxGraphicsContext(renderer) : wxGraphicsContext(renderer)
{ {
@@ -1020,12 +1027,9 @@ class wxQtMeasuringContext : public wxQtGraphicsContext
{ {
public: public:
wxQtMeasuringContext(wxGraphicsRenderer* renderer) wxQtMeasuringContext(wxGraphicsRenderer* renderer)
: wxQtGraphicsContext(renderer, QApplication::desktop()) : wxQtGraphicsContext(renderer, new QPainter())
{ {
} }
private:
QPainter painter;
}; };
class wxQtImageContext : public wxQtGraphicsContext class wxQtImageContext : public wxQtGraphicsContext