Applied #12549: command line usage correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -951,14 +951,13 @@ void wxCmdLineParser::Usage()
|
|||||||
wxString wxCmdLineParser::GetUsageString()
|
wxString wxCmdLineParser::GetUsageString()
|
||||||
{
|
{
|
||||||
wxString appname;
|
wxString appname;
|
||||||
if ( m_data->m_arguments.empty() )
|
|
||||||
{
|
|
||||||
if ( wxTheApp )
|
if ( wxTheApp )
|
||||||
appname = wxTheApp->GetAppName();
|
|
||||||
}
|
|
||||||
else // use argv[0]
|
|
||||||
{
|
{
|
||||||
appname = wxFileName(m_data->m_arguments[0]).GetName();
|
appname = wxFileName(wxTheApp->argv[0]).GetFullName();
|
||||||
|
}
|
||||||
|
else if (!m_data->m_arguments.empty() )
|
||||||
|
{
|
||||||
|
appname = wxFileName(m_data->m_arguments[0]).GetFullName();
|
||||||
}
|
}
|
||||||
|
|
||||||
// we construct the brief cmd line desc on the fly, but not the detailed
|
// we construct the brief cmd line desc on the fly, but not the detailed
|
||||||
|
Reference in New Issue
Block a user