Fix constant naming conflict in KI_DIALOG
This commit is contained in:
parent
8a8b062d8e
commit
918ac567e5
|
@ -57,7 +57,7 @@ KI_DIALOG::KI_DIALOG( wxWindow* aParent, const wxString& aMessage )
|
|||
m_sizerUpper->Add( message, 1, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_sizerMain->Add( m_sizerUpper, 1, wxALL | wxEXPAND, 5 );
|
||||
|
||||
Type( NONE );
|
||||
Type( KD_NONE );
|
||||
Buttons( wxOK );
|
||||
|
||||
SetSizer( m_sizerMain );
|
||||
|
@ -70,13 +70,13 @@ KI_DIALOG& KI_DIALOG::Type( TYPE aType )
|
|||
m_type = aType;
|
||||
|
||||
const std::unordered_map<TYPE, wxString> stdTitle = {
|
||||
{ NONE, _( "Message" ) }, { INFO, _( "Information" ) }, { QUESTION, _( "Question" ) },
|
||||
{ WARNING, _( "Warning" ) }, { ERROR, _( "Error" ) }
|
||||
{ KD_NONE, _( "Message" ) }, { KD_INFO, _( "Information" ) }, { KD_QUESTION, _( "Question" ) },
|
||||
{ KD_WARNING, _( "Warning" ) }, { KD_ERROR, _( "Error" ) }
|
||||
};
|
||||
|
||||
const std::unordered_map<TYPE, wxArtID> icons = {
|
||||
{ INFO, wxART_INFORMATION }, { QUESTION, wxART_QUESTION },
|
||||
{ WARNING, wxART_WARNING }, { ERROR, wxART_ERROR }
|
||||
{ KD_INFO, wxART_INFORMATION }, { KD_QUESTION, wxART_QUESTION },
|
||||
{ KD_WARNING, wxART_WARNING }, { KD_ERROR, wxART_ERROR }
|
||||
};
|
||||
|
||||
if( m_icon )
|
||||
|
@ -86,7 +86,7 @@ KI_DIALOG& KI_DIALOG::Type( TYPE aType )
|
|||
m_icon = nullptr;
|
||||
}
|
||||
|
||||
if( aType != NONE )
|
||||
if( aType != KD_NONE )
|
||||
{
|
||||
m_icon = new wxStaticBitmap( this, wxID_ANY,
|
||||
wxArtProvider::GetBitmap( icons.at( aType ), wxART_CMN_DIALOG ) );
|
||||
|
|
|
@ -48,7 +48,7 @@ class KI_DIALOG : wxDialog
|
|||
{
|
||||
public:
|
||||
///> Dialog type. Selects appropriate icon and default dialog title
|
||||
enum TYPE { NONE, INFO, QUESTION, WARNING, ERROR };
|
||||
enum TYPE { KD_NONE, KD_INFO, KD_QUESTION, KD_WARNING, KD_ERROR };
|
||||
|
||||
KI_DIALOG( wxWindow* aParent, const wxString& aMessage );
|
||||
|
||||
|
|
|
@ -808,7 +808,7 @@ bool PNS_KICAD_IFACE::syncZone( PNS::NODE* aWorld, ZONE_CONTAINER* aZone )
|
|||
aZone->GetPosition().x, aZone->GetPosition().y, aZone->GetSelectMenuText() );
|
||||
|
||||
KI_DIALOG dlg( nullptr, msg );
|
||||
dlg.Type( KI_DIALOG::WARNING ).Title( _( "Malformed keep-out zone" ) ).DoNotShowCheckbox();
|
||||
dlg.Type( KI_DIALOG::KD_WARNING ).Title( _( "Malformed keep-out zone" ) ).DoNotShowCheckbox();
|
||||
dlg.ShowModal();
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue