Fix bug in net <-> netclass matching.
Also adds a "Default" setting for Edit Text and Graphics Properties so the linestyle can be batch-edited back to default. Fixes https://gitlab.com/kicad/code/kicad/issues/5674
This commit is contained in:
parent
2799faf52b
commit
7062a3b29b
|
@ -62,6 +62,8 @@ static bool g_filterByNet;
|
||||||
static wxString g_netFilter;
|
static wxString g_netFilter;
|
||||||
|
|
||||||
|
|
||||||
|
#define DEFAULT_STYLE _( "Default" )
|
||||||
|
|
||||||
class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS : public DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE
|
class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS : public DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE
|
||||||
{
|
{
|
||||||
SCH_EDIT_FRAME* m_parent;
|
SCH_EDIT_FRAME* m_parent;
|
||||||
|
@ -106,6 +108,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS( SCH_
|
||||||
if( !ADVANCED_CFG::GetCfg().m_realTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
if( !ADVANCED_CFG::GetCfg().m_realTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||||
m_parent->RecalculateConnections( NO_CLEANUP );
|
m_parent->RecalculateConnections( NO_CLEANUP );
|
||||||
|
|
||||||
|
m_lineStyle->Append( DEFAULT_STYLE );
|
||||||
m_lineStyle->Append( INDETERMINATE_ACTION );
|
m_lineStyle->Append( INDETERMINATE_ACTION );
|
||||||
|
|
||||||
m_sdbSizerButtonsOK->SetDefault();
|
m_sdbSizerButtonsOK->SetDefault();
|
||||||
|
@ -279,7 +282,11 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( const SCH_SHEET_PATH& aS
|
||||||
|
|
||||||
if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
|
if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
|
||||||
{
|
{
|
||||||
lineItem->SetLineStyle( m_lineStyle->GetSelection() );
|
if( m_lineStyle->GetStringSelection() == DEFAULT_STYLE )
|
||||||
|
lineItem->SetLineStyle( PLOT_DASH_TYPE::DEFAULT );
|
||||||
|
else
|
||||||
|
lineItem->SetLineStyle( m_lineStyle->GetSelection() );
|
||||||
|
|
||||||
m_hasChange = true;
|
m_hasChange = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -820,7 +820,7 @@ void SCH_LINE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aList )
|
||||||
conn->AppendInfoToMsgPanel( aList );
|
conn->AppendInfoToMsgPanel( aList );
|
||||||
|
|
||||||
NET_SETTINGS& netSettings = Schematic()->Prj().GetProjectFile().NetSettings();
|
NET_SETTINGS& netSettings = Schematic()->Prj().GetProjectFile().NetSettings();
|
||||||
wxString netname = conn->Name( true );
|
wxString netname = conn->Name();
|
||||||
wxString netclassName = netSettings.m_NetClasses.GetDefaultPtr()->GetName();
|
wxString netclassName = netSettings.m_NetClasses.GetDefaultPtr()->GetName();
|
||||||
|
|
||||||
if( netSettings.m_NetClassAssignments.count( netname ) )
|
if( netSettings.m_NetClassAssignments.count( netname ) )
|
||||||
|
|
Loading…
Reference in New Issue