Fixes wxSingleChoiceDialog ambiguous constructor compile bug using wxWidgets 2.9.4 or greater.

This commit is contained in:
Wayne Stambaugh 2012-02-26 14:57:48 -05:00
parent 6219291ddc
commit 07e5eee133
2 changed files with 11 additions and 3 deletions

View File

@ -2,7 +2,6 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1994 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
@ -457,8 +456,13 @@ void GERBVIEW_FRAME::Liste_D_Codes()
}
}
wxSingleChoiceDialog dlg( this, wxEmptyString, _( "D Codes" ), list, NULL,
#if wxCHECK_VERSION( 2, 9, 4 )
wxSingleChoiceDialog dlg( this, wxEmptyString, _( "D Codes" ), list, (void**)NULL,
wxCHOICEDLG_STYLE & ~wxCANCEL );
#else
wxSingleChoiceDialog dlg( this, wxEmptyString, _( "D Codes" ), list, (char**)NULL,
wxCHOICEDLG_STYLE & ~wxCANCEL );
#endif
dlg.ShowModal();
}

View File

@ -75,7 +75,11 @@ void PCB_EDIT_FRAME::ListNetsAndSelect( wxCommandEvent& event )
list.Add( Line );
}
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, NULL );
#if wxCHECK_VERSION( 2, 9, 4 )
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (void**) NULL );
#else
wxSingleChoiceDialog choiceDlg( this, wxEmptyString, _( "Select Net" ), list, (char**) NULL );
#endif
if( (choiceDlg.ShowModal() == wxID_CANCEL) || (choiceDlg.GetSelection() == wxNOT_FOUND) )
return;