From: Vadim Zeitlin Date: Mon, 23 Oct 2006 20:19:44 +0000 (+0000) Subject: don't show licence pane if there is no licence text X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/886b7d745ccb4bdcc3c6e4cf0ba061d720f8bf62 don't show licence pane if there is no licence text git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/aboutdlgg.cpp b/src/generic/aboutdlgg.cpp index 61f0db4470..506662d6c7 100644 --- a/src/generic/aboutdlgg.cpp +++ b/src/generic/aboutdlgg.cpp @@ -134,13 +134,17 @@ bool wxGenericAboutDialog::Create(const wxAboutDialogInfo& info) } // add licence - wxCollapsiblePane *licensepnl = new wxCollapsiblePane(this, wxID_ANY, wxT("License")); + if ( info.HasLicence() ) + { + wxCollapsiblePane * + licensepnl = new wxCollapsiblePane(this, wxID_ANY, wxT("License")); - new wxStaticText(licensepnl->GetPane(), wxID_ANY, info.GetLicence(), - wxDefaultPosition, wxDefaultSize, - wxALIGN_CENTRE); + new wxStaticText(licensepnl->GetPane(), wxID_ANY, info.GetLicence(), + wxDefaultPosition, wxDefaultSize, + wxALIGN_CENTRE); - m_sizerText->Add(licensepnl, wxSizerFlags(1).Expand().Border(wxBOTTOM)); + m_sizerText->Add(licensepnl, wxSizerFlags(1).Expand().Border(wxBOTTOM)); + } // TODO: add credits (developers, artists, doc writers, translators)