Update wxImage used by Mac image graphics context in Flush()
Calling Flush() is supposed to make everything drawn so far immediately visible, which means propagating it to the wxImage being drawn on in the case of image-based graphics context, but wxMacCoreGraphicsImageContext didn't do it, unlike Cairo and GDI+ version. Fix this by overriding Flush() in it to explicitly update m_image. Closes https://github.com/wxWidgets/wxWidgets/pull/1321
This commit is contained in:
@@ -2601,6 +2601,12 @@ public:
|
||||
m_image = m_bitmap.ConvertToImage();
|
||||
}
|
||||
|
||||
virtual void Flush() wxOVERRIDE
|
||||
{
|
||||
wxMacCoreGraphicsContext::Flush();
|
||||
m_image = m_bitmap.ConvertToImage();
|
||||
}
|
||||
|
||||
private:
|
||||
wxImage& m_image;
|
||||
wxBitmap m_bitmap;
|
||||
|
Reference in New Issue
Block a user