added wxDialog::GetParentForModalDialog() and use it to try to always create modal dialogs with a parent (slightly modified patch 1702962)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -102,8 +102,8 @@ wxIcon wxAboutDialogInfo::GetIcon() const
|
||||
|
||||
bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info)
|
||||
{
|
||||
// TODO: should we use main frame as parent by default here?
|
||||
if ( !wxDialog::Create(NULL, wxID_ANY, _("About ") + info.GetName(),
|
||||
// this is a modal dialog thus we'll use GetParentForModalDialog:
|
||||
if ( !wxDialog::Create(GetParentForModalDialog(), wxID_ANY, _("About ") + info.GetName(),
|
||||
wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE) )
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user