don't leak wxImageList if wxHF_CONTENTS is not used in wxHtmlHelpWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -315,17 +315,6 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
m_hfStyle = helpStyle;
|
m_hfStyle = helpStyle;
|
||||||
|
|
||||||
wxImageList *ContentsImageList = new wxImageList(16, 16);
|
|
||||||
ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_BOOK,
|
|
||||||
wxART_HELP_BROWSER,
|
|
||||||
wxSize(16, 16)));
|
|
||||||
ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_FOLDER,
|
|
||||||
wxART_HELP_BROWSER,
|
|
||||||
wxSize(16, 16)));
|
|
||||||
ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_PAGE,
|
|
||||||
wxART_HELP_BROWSER,
|
|
||||||
wxSize(16, 16)));
|
|
||||||
|
|
||||||
// Do the config in two steps. We read the HtmlWindow customization after we
|
// Do the config in two steps. We read the HtmlWindow customization after we
|
||||||
// create the window.
|
// create the window.
|
||||||
if (m_Config)
|
if (m_Config)
|
||||||
@@ -365,7 +354,7 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id,
|
|||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
wxBorder htmlWindowBorder = GetDefaultBorder();
|
wxBorder htmlWindowBorder = GetDefaultBorder();
|
||||||
if (htmlWindowBorder == wxBORDER_SUNKEN)
|
if (htmlWindowBorder == wxBORDER_SUNKEN)
|
||||||
htmlWindowBorder = wxBORDER_SIMPLE;
|
htmlWindowBorder = wxBORDER_SIMPLE;
|
||||||
#else
|
#else
|
||||||
wxBorder htmlWindowBorder = wxBORDER_SIMPLE;
|
wxBorder htmlWindowBorder = wxBORDER_SIMPLE;
|
||||||
#endif
|
#endif
|
||||||
@@ -459,6 +448,17 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id,
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
wxImageList *ContentsImageList = new wxImageList(16, 16);
|
||||||
|
ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_BOOK,
|
||||||
|
wxART_HELP_BROWSER,
|
||||||
|
wxSize(16, 16)));
|
||||||
|
ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_FOLDER,
|
||||||
|
wxART_HELP_BROWSER,
|
||||||
|
wxSize(16, 16)));
|
||||||
|
ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_PAGE,
|
||||||
|
wxART_HELP_BROWSER,
|
||||||
|
wxSize(16, 16)));
|
||||||
|
|
||||||
m_ContentsBox->AssignImageList(ContentsImageList);
|
m_ContentsBox->AssignImageList(ContentsImageList);
|
||||||
|
|
||||||
topsizer->Add(m_ContentsBox, 1,
|
topsizer->Add(m_ContentsBox, 1,
|
||||||
|
Reference in New Issue
Block a user