No changes, just slightly simplify the tool insertion code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 10 Dec 2009 02:59:02 +0000 (02:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 10 Dec 2009 02:59:02 +0000 (02:59 +0000)
commit2600776164cbac3a9db926e5c50847be44bee494
treeb4882f467ce169f169ae0e5f8f0c3995864c30ce
parent960615f41009ac62e99f833afbec10d96bd2d2f9
No changes, just slightly simplify the tool insertion code.

Added a helper DoInsertNewTool() function to avoid code duplication and ensure
that we never forget to delete a new tool if inserting it into the toolbar
failed.

Also explicitly document that the tool passed to the public InsertTool() is
not owned by the toolbar and so must be deleted by the caller if its insertion
failed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/tbarbase.h
interface/wx/toolbar.h
src/common/tbarbase.cpp