Fix radiobox order for FILL_T

Fixes https://gitlab.com/kicad/code/kicad/issues/9412
This commit is contained in:
Seth Hillbrand 2021-10-17 17:00:54 -07:00
parent 094fdc1b13
commit 64bcaaefd1
2 changed files with 3 additions and 2 deletions

View File

@ -84,7 +84,7 @@ bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow()
m_checkApplyToAllConversions->Enable( enblConvOptStyle );
if( shape )
m_fillCtrl->SetSelection( static_cast<int>( shape->GetFillType() ) );
m_fillCtrl->SetSelection( static_cast<int>( shape->GetFillType() ) - 1 );
m_fillCtrl->Enable( shape != nullptr );
@ -100,7 +100,7 @@ bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataFromWindow()
EDA_SHAPE* shape = dynamic_cast<EDA_SHAPE*>( m_item );
if( shape )
shape->SetFillMode((FILL_T) std::max( m_fillCtrl->GetSelection(), 0 ));
shape->SetFillMode( static_cast<FILL_T>( std::max( m_fillCtrl->GetSelection() + 1, 1 ) ) );
if( shape )
shape->SetWidth( m_lineWidth.GetValue() );

View File

@ -49,6 +49,7 @@ enum class SHAPE_T : int
};
// WARNING: Do not change these values without updating dialogs that depend on their position values
enum class FILL_T : int
{
NO_FILL = 1,