]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't update position of widgets in a wxPizza from size_allocate handler.
authorPaul Cornett <paulcor@bullseye.com>
Sat, 31 Aug 2013 03:25:12 +0000 (03:25 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 31 Aug 2013 03:25:12 +0000 (03:25 +0000)
The values in m_{x,y} are not the same as client coordinates if the wxPizza is scrolled.
Closes #15444

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 3f5d2adf95479acb328b15bc5b0a105fface4f9e..14fe92ca2451e4058bb2dd02aeecb5e2ce4d33a9 100644 (file)
@@ -1927,9 +1927,11 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxWindow* win)
     GtkAllocation a;
     gtk_widget_get_allocation(win->m_widget, &a);
     // update position for widgets in native containers, such as wxToolBar
-    // (for widgets in a wxPizza, the values should already be the same)
-    win->m_x = a.x;
-    win->m_y = a.y;
+    if (!WX_IS_PIZZA(gtk_widget_get_parent(win->m_widget)))
+    {
+        win->m_x = a.x;
+        win->m_y = a.y;
+    }
     win->m_useCachedClientSize = true;
     if (win->m_clientWidth != w || win->m_clientHeight != h)
     {