From 5524cec1937eb85ab0ef836802a57b5b65d490ca Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 20 Dec 2015 10:20:30 -0800 Subject: [PATCH] implement Flush() for wxImage wxGraphicsContext under Cairo and GDI+, see #16694 --- src/generic/graphicc.cpp | 5 +++++ src/msw/graphics.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 02310e9242..4570603ec9 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -510,6 +510,11 @@ public: } virtual ~wxCairoImageContext() + { + Flush(); + } + + virtual void Flush() wxOVERRIDE { m_image = m_data.ConvertToImage(); } diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index f875891d82..e484e0c972 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -451,6 +451,11 @@ public: } virtual ~wxGDIPlusImageContext() + { + Flush(); + } + + virtual void Flush() wxOVERRIDE { m_image = m_bitmap.ConvertToImage(); }