Fix painting logic in wxQt wxClientDC implementation

The original drawing mechanism was generating lots of QWarning messages
when running samples (e.g. htlbox, caret, etc.) and in some cases was
not actually completely drawing every element of the sample. The issue
was that the QPicture was being shared incorrectly between wxWindow and
wxClientDC and attempts to start painting, update, etc. were generating
console warnings.

Closes https://github.com/wxWidgets/wxWidgets/pull/1152
This commit is contained in:
chris2oph
2019-01-31 09:49:11 +00:00
committed by Vadim Zeitlin
parent 7d2e6e805f
commit f8c345ca95
4 changed files with 51 additions and 13 deletions

View File

@@ -10,6 +10,10 @@
#include "wx/qt/dc.h"
#include "wx/scopedptr.h"
class QPicture;
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxQtDCImpl
{
public:
@@ -35,6 +39,8 @@ public:
~wxClientDCImpl();
private:
wxScopedPtr<QPicture> m_pict;
wxDECLARE_CLASS(wxClientDCImpl);
wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
};