Minor cleanup after last commit

This commit is contained in:
Marek Roszko 2023-08-24 21:19:35 -04:00
parent 339684263c
commit d32b55f504
2 changed files with 5 additions and 5 deletions

View File

@ -198,7 +198,7 @@ bool DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow()
STROKE_PARAMS stroke = m_textBox->GetStroke(); STROKE_PARAMS stroke = m_textBox->GetStroke();
m_borderCheckbox->SetValue( m_textBox->IsBorderEnabled() ); m_borderCheckbox->SetValue( m_textBox->IsBorderEnabled() );
if( stroke.GetWidth() >= 0 ) if( m_textBox->IsBorderEnabled() )
m_borderWidth.SetValue( stroke.GetWidth() ); m_borderWidth.SetValue( stroke.GetWidth() );
PLOT_DASH_TYPE style = stroke.GetPlotStyle(); PLOT_DASH_TYPE style = stroke.GetPlotStyle();
@ -209,9 +209,9 @@ bool DIALOG_TEXTBOX_PROPERTIES::TransferDataToWindow()
if( (int) style < (int) lineTypeNames.size() ) if( (int) style < (int) lineTypeNames.size() )
m_borderStyleCombo->SetSelection( (int) style ); m_borderStyleCombo->SetSelection( (int) style );
m_borderWidth.Enable( stroke.GetWidth() >= 0 ); m_borderWidth.Enable( m_textBox->IsBorderEnabled() );
m_borderStyleLabel->Enable( stroke.GetWidth() >= 0 ); m_borderStyleLabel->Enable( m_textBox->IsBorderEnabled() );
m_borderStyleCombo->Enable( stroke.GetWidth() >= 0 ); m_borderStyleCombo->Enable( m_textBox->IsBorderEnabled() );
return DIALOG_TEXTBOX_PROPERTIES_BASE::TransferDataToWindow(); return DIALOG_TEXTBOX_PROPERTIES_BASE::TransferDataToWindow();
} }

View File

@ -554,7 +554,7 @@ void PCB_TEXTBOX::TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID
bool PCB_TEXTBOX::IsBorderEnabled() const bool PCB_TEXTBOX::IsBorderEnabled() const
{ {
return m_stroke.GetWidth() != -1; return m_stroke.GetWidth() >= 0;
} }