]> git.saurik.com Git - wxWidgets.git/commit
Ensure that frame is re-laid out when its toolbar is deleted.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 28 Dec 2009 16:18:37 +0000 (16:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 28 Dec 2009 16:18:37 +0000 (16:18 +0000)
commit62f6be4448a1a8ba6b3ddc920df7c0957b7b1f31
treed0e3f70daea9164c627ab8020bd728922f449afc
parent93ffd498e60dbf13a18b3031b15fd892a6b1c57a
Ensure that frame is re-laid out when its toolbar is deleted.

The code in wxFrameBase::SetToolBar() didn't work correctly when toolbar was
unset using SetToolBar(NULL) because the frame toolbar pointer was reset
before layout was done resulting in the frame not recognizing its (still
existing) toolbar child as one of its bars and so nothing was done at all when
the frame had a single child, as in the toolbar sample.

Correct this by carefully ensuring that the toolbar pointer is still set at
the moment of the layout but hide the toolbar to ensure that no place is
allocated for it.

Also mention that it is not necessary to call SetToolBar(NULL) at all if the
toolbar is being deleted anyhow in the sample as toolbar does this itself in
its destructor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
samples/toolbar/toolbar.cpp
src/common/framecmn.cpp