From 64bcaaefd17dca203824fbe0f3815d8df13cc633 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 17 Oct 2021 17:00:54 -0700 Subject: [PATCH] Fix radiobox order for FILL_T Fixes https://gitlab.com/kicad/code/kicad/issues/9412 --- eeschema/dialogs/dialog_lib_shape_properties.cpp | 4 ++-- include/eda_shape.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_lib_shape_properties.cpp b/eeschema/dialogs/dialog_lib_shape_properties.cpp index a3804be3f1..bb85b28238 100644 --- a/eeschema/dialogs/dialog_lib_shape_properties.cpp +++ b/eeschema/dialogs/dialog_lib_shape_properties.cpp @@ -84,7 +84,7 @@ bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow() m_checkApplyToAllConversions->Enable( enblConvOptStyle ); if( shape ) - m_fillCtrl->SetSelection( static_cast( shape->GetFillType() ) ); + m_fillCtrl->SetSelection( static_cast( shape->GetFillType() ) - 1 ); m_fillCtrl->Enable( shape != nullptr ); @@ -100,7 +100,7 @@ bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataFromWindow() EDA_SHAPE* shape = dynamic_cast( m_item ); if( shape ) - shape->SetFillMode((FILL_T) std::max( m_fillCtrl->GetSelection(), 0 )); + shape->SetFillMode( static_cast( std::max( m_fillCtrl->GetSelection() + 1, 1 ) ) ); if( shape ) shape->SetWidth( m_lineWidth.GetValue() ); diff --git a/include/eda_shape.h b/include/eda_shape.h index 409a5d6b52..d5305504ec 100644 --- a/include/eda_shape.h +++ b/include/eda_shape.h @@ -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,