]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix bug where native views with the NSScrollView wrapper would have their
authorDavid Elliott <dfe@tgwbd.org>
Mon, 18 Feb 2008 04:58:07 +0000 (04:58 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Mon, 18 Feb 2008 04:58:07 +0000 (04:58 +0000)
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

src/cocoa/window.mm

index bb25bcc3337e51c489e6c18524ca4a28ffc4f23d..fecbd8ac706551d634d0124b58f9adb7d7bdca52 100644 (file)
@@ -903,7 +903,14 @@ void wxWindowCocoaScrollView::Cocoa_FrameChanged(void)
     wxSizeEvent event(m_owner->GetSize(), m_owner->GetId());
     event.SetEventObject(m_owner);
     m_owner->HandleWindowEvent(event);
-    UpdateSizes();
+
+    /*  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();
 }
 
 // ========================================================================