fixed mem leak when using non default theme; change the art provider automatically when the theme is changed (patch 646463)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -121,9 +121,6 @@ bool wxAppBase::OnInitGui()
|
||||
#ifdef __WXUNIVERSAL__
|
||||
if ( !wxTheme::Get() && !wxTheme::CreateDefault() )
|
||||
return FALSE;
|
||||
wxArtProvider *art = wxTheme::Get()->GetArtProvider();
|
||||
if ( art )
|
||||
wxArtProvider::PushProvider(art);
|
||||
#endif // __WXUNIVERSAL__
|
||||
|
||||
return TRUE;
|
||||
@@ -385,6 +382,8 @@ bool wxAppBase::OnCmdLineParsed(wxCmdLineParser& parser)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Delete the defaultly created theme and set the new theme.
|
||||
delete wxTheme::Get();
|
||||
wxTheme::Set(theme);
|
||||
}
|
||||
#endif // __WXUNIVERSAL__
|
||||
|
||||
Reference in New Issue
Block a user