]> git.saurik.com Git - wxWidgets.git/commitdiff
Reset the position when auto-sizing toolbar
authorJulian Smart <julian@anthemion.co.uk>
Sat, 1 Apr 2006 18:16:17 +0000 (18:16 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 1 Apr 2006 18:16:17 +0000 (18:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/tbar95.cpp

index 1a18ce01f24001243fec0be3afc7cc81b834b2a5..21a7755a457893365624ed03002d1ab2b841a1bf 100644 (file)
@@ -1252,7 +1252,10 @@ wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const
 
 void wxToolBar::UpdateSize()
 {
+    wxPoint pos = GetPosition();
     ::SendMessage(GetHwnd(), TB_AUTOSIZE, 0, 0);
+    if (pos != GetPosition())
+        Move(pos);
 
     // In case Realize is called after the initial display (IOW the programmer
     // may have rebuilt the toolbar) give the frame the option of resizing the