Fixes crash in wire property dialog
Fixes crash when changes are applied with the style combo in the indeterminate state.
This commit is contained in:
parent
f892194be4
commit
2651d7ff5b
|
@ -193,11 +193,13 @@ bool DIALOG_WIRE_BUS_PROPERTIES::TransferDataFromWindow()
|
|||
static_cast<SCH_BUS_ENTRY_BASE*>( item )->SetPenWidth( width );
|
||||
}
|
||||
|
||||
size_t lineTypeSelection = m_typeCombo->GetSelection();
|
||||
if( lineTypeSelection < lineTypeNames.size() )
|
||||
{
|
||||
PLOT_DASH_TYPE lineStyle = PLOT_DASH_TYPE::DEFAULT;
|
||||
|
||||
auto it = lineTypeNames.begin();
|
||||
std::advance( it, m_typeCombo->GetSelection() );
|
||||
|
||||
std::advance( it, lineTypeSelection );
|
||||
if( it != lineTypeNames.end() )
|
||||
lineStyle = it->first;
|
||||
|
||||
|
@ -205,6 +207,7 @@ bool DIALOG_WIRE_BUS_PROPERTIES::TransferDataFromWindow()
|
|||
static_cast<SCH_LINE*>( item )->SetLineStyle( lineStyle );
|
||||
else if( dynamic_cast<SCH_BUS_ENTRY_BASE*>( item ) )
|
||||
static_cast<SCH_BUS_ENTRY_BASE*>( item )->SetLineStyle( lineStyle );
|
||||
}
|
||||
|
||||
COLOR4D color = m_colorSwatch->GetSwatchColor();
|
||||
|
||||
|
|
Loading…
Reference in New Issue