Convert tabs to spaces in panel_setup_severities
This commit is contained in:
parent
1b4ec6ccb5
commit
2ef5e5d1c0
|
@ -36,20 +36,20 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
|
||||||
m_items( aItems ),
|
m_items( aItems ),
|
||||||
m_pinMapSpecialCase( aPinMapSpecialCase )
|
m_pinMapSpecialCase( aPinMapSpecialCase )
|
||||||
{
|
{
|
||||||
wxString severities[] = { _( "Error" ), _( "Warning" ), _( "Ignore" ) };
|
wxString severities[] = { _( "Error" ), _( "Warning" ), _( "Ignore" ) };
|
||||||
int severityCount = sizeof( severities ) / sizeof( wxString );
|
int severityCount = sizeof( severities ) / sizeof( wxString );
|
||||||
int baseID = 1000;
|
int baseID = 1000;
|
||||||
wxBoxSizer* panelSizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer* panelSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
wxScrolledWindow* scrollWin = new wxScrolledWindow( this, wxID_ANY,
|
wxScrolledWindow* scrollWin = new wxScrolledWindow( this, wxID_ANY,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxTAB_TRAVERSAL | wxVSCROLL );
|
wxTAB_TRAVERSAL | wxVSCROLL );
|
||||||
|
|
||||||
scrollWin->SetScrollRate( 0, 5 );
|
scrollWin->SetScrollRate( 0, 5 );
|
||||||
|
|
||||||
wxFlexGridSizer* gridSizer = new wxFlexGridSizer( 0, 2, 0, 5 );
|
wxFlexGridSizer* gridSizer = new wxFlexGridSizer( 0, 2, 0, 5 );
|
||||||
gridSizer->SetFlexibleDirection( wxBOTH );
|
gridSizer->SetFlexibleDirection( wxBOTH );
|
||||||
|
|
||||||
for( const RC_ITEM& item : m_items )
|
for( const RC_ITEM& item : m_items )
|
||||||
{
|
{
|
||||||
int errorCode = item.GetErrorCode();
|
int errorCode = item.GetErrorCode();
|
||||||
wxString msg = item.GetErrorText();
|
wxString msg = item.GetErrorText();
|
||||||
|
@ -60,15 +60,15 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
|
||||||
// When msg is empty, for some reason, the current errorCode is not supported
|
// When msg is empty, for some reason, the current errorCode is not supported
|
||||||
// by the RC_ITEM aDummyItem.
|
// by the RC_ITEM aDummyItem.
|
||||||
// Skip this errorCode.
|
// Skip this errorCode.
|
||||||
if( !msg.IsEmpty() )
|
if( !msg.IsEmpty() )
|
||||||
{
|
{
|
||||||
wxStaticText* errorLabel = new wxStaticText( scrollWin, wxID_ANY, msg + wxT( ":" ) );
|
wxStaticText* errorLabel = new wxStaticText( scrollWin, wxID_ANY, msg + wxT( ":" ) );
|
||||||
gridSizer->Add( errorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 4 );
|
gridSizer->Add( errorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL | wxEXPAND, 4 );
|
||||||
|
|
||||||
// OSX can't handle more than 100 radio buttons in a single window (yes, seriously),
|
// OSX can't handle more than 100 radio buttons in a single window (yes, seriously),
|
||||||
// so we have to create a window for each set
|
// so we have to create a window for each set
|
||||||
wxPanel* radioPanel = new wxPanel( scrollWin );
|
wxPanel* radioPanel = new wxPanel( scrollWin );
|
||||||
wxBoxSizer* radioSizer = new wxBoxSizer( wxHORIZONTAL );
|
wxBoxSizer* radioSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
for( int i = 0; i < severityCount; ++i )
|
for( int i = 0; i < severityCount; ++i )
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,8 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_pinMapSpecialCase )
|
|
||||||
|
if( m_pinMapSpecialCase )
|
||||||
{
|
{
|
||||||
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxT( "" ), _( "Ignore" ) };
|
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxT( "" ), _( "Ignore" ) };
|
||||||
int errorCode = m_pinMapSpecialCase->GetErrorCode();
|
int errorCode = m_pinMapSpecialCase->GetErrorCode();
|
||||||
|
@ -125,12 +126,12 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
|
||||||
|
|
||||||
scrollWin->SetSizer( gridSizer );
|
scrollWin->SetSizer( gridSizer );
|
||||||
scrollWin->Layout();
|
scrollWin->Layout();
|
||||||
gridSizer->Fit( scrollWin );
|
gridSizer->Fit( scrollWin );
|
||||||
panelSizer->Add( scrollWin, 1, wxEXPAND | wxALL, 5 );
|
panelSizer->Add( scrollWin, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
this->SetSizer( panelSizer );
|
this->SetSizer( panelSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
panelSizer->Fit( this );
|
panelSizer->Fit( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue