Fix several problem with wxMemoryDC in wxQt
Under wxQT, wxMemoryDC was previously rendering to a temporary image which was only being blitted back to the original wxBitmap when either the DC wx destroyed or a new bitmap was selected (via SelectObject). With these change wxMemoryDCImpl now draws directly to the bitmap managed by wxBitmap, this makes the behaviour more consistent with the MSW and GTK implementations. Closes https://github.com/wxWidgets/wxWidgets/pull/1083
This commit is contained in:
committed by
Vadim Zeitlin
parent
80904d1bc7
commit
ae20edb539
@@ -31,7 +31,6 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner )
|
||||
: wxQtDCImpl( owner )
|
||||
{
|
||||
m_window = NULL;
|
||||
m_qtImage = NULL;
|
||||
m_ok = false;
|
||||
m_qtPainter = new QPainter();
|
||||
}
|
||||
@@ -40,7 +39,6 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *win )
|
||||
: wxQtDCImpl( owner )
|
||||
{
|
||||
m_window = win;
|
||||
m_qtImage = NULL;
|
||||
m_qtPainter = m_window->QtGetPainter();
|
||||
// if we're not inside a Paint event, painter will invalid
|
||||
m_ok = m_qtPainter != NULL;
|
||||
|
Reference in New Issue
Block a user