Fix bug where native views with the NSScrollView wrapper would have their
document size reset to the wx virtual size upon any size event. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b5e2a45022
commit
e71594c236
@ -903,6 +903,13 @@ void wxWindowCocoaScrollView::Cocoa_FrameChanged(void)
|
|||||||
wxSizeEvent event(m_owner->GetSize(), m_owner->GetId());
|
wxSizeEvent event(m_owner->GetSize(), m_owner->GetId());
|
||||||
event.SetEventObject(m_owner);
|
event.SetEventObject(m_owner);
|
||||||
m_owner->HandleWindowEvent(event);
|
m_owner->HandleWindowEvent(event);
|
||||||
|
|
||||||
|
/* If the view is not a native one then it's being managed by wx. In this case the control
|
||||||
|
may decide to change its virtual size and we must update the document view's size to
|
||||||
|
match. For native views the virtual size will never have been set so we do not want
|
||||||
|
to use it at all.
|
||||||
|
*/
|
||||||
|
if(!m_isNativeView)
|
||||||
UpdateSizes();
|
UpdateSizes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user