Initialize wxWindowDCImpl::m_window for hidden windows too
Ensure that we set m_window in case of early return from wxWindowDCImpl ctor, so that using e.g. wxDC::GetSize() works for wxClientDC created for windows that hadn't been realized yet. It might be possible to avoid this early return completely as the comment explaining why we're doing it seems to be out of date: our SetBackground() doesn't call wxWindow::SetBackground() (and it would be exceedingly strange if it did), but for now just the bug without changing anything else. Closes #18569.
This commit is contained in:
@@ -314,6 +314,8 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) :
|
||||
// Don't report problems as per MSW.
|
||||
m_ok = true;
|
||||
|
||||
m_window = window;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user