Tidy incorrect column width (and fix some formatting).

This commit is contained in:
Jeff Young 2024-06-04 13:00:02 +01:00
parent e5bad195b6
commit 42caceb799
4 changed files with 2781 additions and 2740 deletions

View File

@ -317,7 +317,7 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataToWindow()
}
// notify the grid
wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_fields->size() );
wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, (int) m_fields->size() );
m_grid->ProcessTableMessage( msg );
AdjustGridColumns( m_grid->GetRect().GetWidth() );
@ -549,9 +549,9 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataFromWindow()
}
if( m_currentLabel->Type() == SCH_DIRECTIVE_LABEL_T )
static_cast<SCH_DIRECTIVE_LABEL*>( m_currentLabel )->SetPinLength( m_textSize.GetValue() );
else if( m_currentLabel->GetTextWidth() != m_textSize.GetValue() )
m_currentLabel->SetTextSize( VECTOR2I( m_textSize.GetValue(), m_textSize.GetValue() ) );
static_cast<SCH_DIRECTIVE_LABEL*>( m_currentLabel )->SetPinLength( m_textSize.GetIntValue() );
else if( m_currentLabel->GetTextWidth() != m_textSize.GetIntValue() )
m_currentLabel->SetTextSize( VECTOR2I( m_textSize.GetIntValue(), m_textSize.GetIntValue() ) );
// Must come after SetTextSize()
m_currentLabel->SetBold( m_bold->IsChecked() );
@ -678,7 +678,10 @@ void DIALOG_LABEL_PROPERTIES::OnDeleteField( wxCommandEvent& event )
m_grid->CommitPendingChanges( true /* quiet mode */ );
// Reverse sort so deleting a row doesn't change the indexes of the other rows.
selectedRows.Sort( []( int* first, int* second ) { return *second - *first; } );
selectedRows.Sort( []( int* first, int* second )
{
return *second - *first;
} );
for( int row : selectedRows )
{

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -71,7 +71,7 @@ DIALOG_LABEL_PROPERTIES_BASE::DIALOG_LABEL_PROPERTIES_BASE( wxWindow* parent, wx
m_grid->SetColSize( 0, 72 );
m_grid->SetColSize( 1, 84 );
m_grid->SetColSize( 2, 48 );
m_grid->SetColSize( 3, 84 );
m_grid->SetColSize( 3, 48 );
m_grid->SetColSize( 4, 70 );
m_grid->SetColSize( 5, 70 );
m_grid->SetColSize( 6, 48 );

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!