From 0ba7f0e7664a627280c4c6a9b0777a9d147f67dd Mon Sep 17 00:00:00 2001 From: Damjan Date: Tue, 28 Jan 2025 15:21:27 +0000 Subject: [PATCH] Eeschema: Default value for line style combo box in Graphic properties dialog window is Combo! --- eeschema/dialogs/dialog_line_properties.cpp | 2 +- eeschema/dialogs/dialog_shape_properties.cpp | 2 +- eeschema/dialogs/dialog_wire_bus_properties.cpp | 6 +++--- include/stroke_params.h | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/eeschema/dialogs/dialog_line_properties.cpp b/eeschema/dialogs/dialog_line_properties.cpp index 1b6264785e..099d7f72e6 100644 --- a/eeschema/dialogs/dialog_line_properties.cpp +++ b/eeschema/dialogs/dialog_line_properties.cpp @@ -117,7 +117,7 @@ void DIALOG_LINE_PROPERTIES::resetDefaults( wxCommandEvent& event ) m_width.SetValue( 0 ); m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false ); - m_typeCombo->SetStringSelection( DEFAULT_STYLE ); + m_typeCombo->SetStringSelection( DEFAULT_LINE_STYLE_LABEL ); Refresh(); } diff --git a/eeschema/dialogs/dialog_shape_properties.cpp b/eeschema/dialogs/dialog_shape_properties.cpp index 0f7d1db50b..17bd503c85 100644 --- a/eeschema/dialogs/dialog_shape_properties.cpp +++ b/eeschema/dialogs/dialog_shape_properties.cpp @@ -138,7 +138,7 @@ bool DIALOG_SHAPE_PROPERTIES::TransferDataToWindow() int style = static_cast( m_shape->GetStroke().GetLineStyle() ); if( style == -1 ) - m_borderStyleCombo->SetStringSelection( DEFAULT_STYLE ); + m_borderStyleCombo->SetStringSelection( DEFAULT_LINE_STYLE_LABEL ); else if( style < (int) lineTypeNames.size() ) m_borderStyleCombo->SetSelection( style ); else diff --git a/eeschema/dialogs/dialog_wire_bus_properties.cpp b/eeschema/dialogs/dialog_wire_bus_properties.cpp index 7fdcfca178..4b75e7eddb 100644 --- a/eeschema/dialogs/dialog_wire_bus_properties.cpp +++ b/eeschema/dialogs/dialog_wire_bus_properties.cpp @@ -55,7 +55,7 @@ DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME* aParent, for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames ) m_typeCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) ); - m_typeCombo->Append( DEFAULT_STYLE ); + m_typeCombo->Append( DEFAULT_WIRE_STYLE_LABEL ); SetupStandardButtons( { { wxID_APPLY, _( "Default" ) } } ); @@ -125,7 +125,7 @@ bool DIALOG_WIRE_BUS_PROPERTIES::TransferDataToWindow() int style = static_cast( stroke.GetLineStyle() ); if( style == -1 ) - m_typeCombo->SetStringSelection( DEFAULT_STYLE ); + m_typeCombo->SetStringSelection( DEFAULT_WIRE_STYLE_LABEL ); else if( style < (int) lineTypeNames.size() ) m_typeCombo->SetSelection( style ); else @@ -168,7 +168,7 @@ void DIALOG_WIRE_BUS_PROPERTIES::resetDefaults( wxCommandEvent& event ) { m_wireWidth.SetValue( 0 ); m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false ); - m_typeCombo->SetStringSelection( DEFAULT_STYLE ); + m_typeCombo->SetStringSelection( DEFAULT_WIRE_STYLE_LABEL ); m_junctionSize.SetValue( 0 ); Refresh(); diff --git a/include/stroke_params.h b/include/stroke_params.h index 0c3f81f3b6..359ceacecb 100644 --- a/include/stroke_params.h +++ b/include/stroke_params.h @@ -82,7 +82,8 @@ enum class WIRE_STYLE extern const std::map lineTypeNames; -#define DEFAULT_STYLE _( "Default" ) +#define DEFAULT_LINE_STYLE_LABEL _( "Solid" ) +#define DEFAULT_WIRE_STYLE_LABEL _( "Default" ) #define INDETERMINATE_STYLE _( "Leave unchanged" )