Finish implementation of export_current_sheet_as_root.
Fixes https://gitlab.com/kicad/code/kicad/issues/13643
This commit is contained in:
parent
25783f3b7e
commit
4de64b607a
|
@ -304,6 +304,9 @@ void DIALOG_EXPORT_NETLIST::OnRunExternSpiceCommand( wxCommandEvent& event )
|
|||
wxFileName fn = m_Parent->Schematic().GetFileName();
|
||||
fn.SetExt( SpiceFileExtension );
|
||||
|
||||
if( settings.m_SpiceCurSheetAsRoot )
|
||||
netlist_opt |= NETLIST_EXPORTER_SPICE::OPTION_CUR_SHEET_AS_ROOT;
|
||||
|
||||
if( settings.m_SpiceSaveAllVoltages )
|
||||
netlist_opt |= NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES;
|
||||
|
||||
|
@ -473,7 +476,7 @@ void DIALOG_EXPORT_NETLIST::NetlistUpdateOpt()
|
|||
settings.m_SpiceSaveAllVoltages = saveAllVoltages;
|
||||
settings.m_SpiceSaveAllCurrents = saveAllCurrents;
|
||||
settings.m_SpiceCommandString = spiceCmdString;
|
||||
settings.m_SpiceCurSheetAsRoot = curSheetAsRoot;
|
||||
settings.m_SpiceCurSheetAsRoot = curSheetAsRoot;
|
||||
settings.m_SpiceModelCurSheetAsRoot = spiceModelCurSheetAsRoot;
|
||||
settings.m_NetFormatName = m_PanelNetType[m_NoteBook->GetSelection()]->GetPageNetFmtName();
|
||||
}
|
||||
|
|
|
@ -675,7 +675,7 @@ std::string NETLIST_EXPORTER_SPICE::GenerateItemPinNetName( const std::string& a
|
|||
SCH_SHEET_LIST NETLIST_EXPORTER_SPICE::GetSheets( unsigned aNetlistOptions ) const
|
||||
{
|
||||
if( aNetlistOptions & OPTION_CUR_SHEET_AS_ROOT )
|
||||
return SCH_SHEET_LIST( m_schematic->CurrentSheet().at( 0 ) );
|
||||
return SCH_SHEET_LIST( m_schematic->CurrentSheet().Last() );
|
||||
else
|
||||
return m_schematic->GetSheets();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin
|
|||
m_IntersheetRefsSuffix( DEFAULT_IREF_SUFFIX ),
|
||||
m_DashedLineDashRatio( 12.0 ),
|
||||
m_DashedLineGapRatio( 3.0 ),
|
||||
m_SpiceAdjustPassiveValues( false ),
|
||||
m_SpiceCurSheetAsRoot( false ),
|
||||
m_SpiceSaveAllVoltages( false ),
|
||||
m_SpiceSaveAllCurrents( false ),
|
||||
|
@ -195,8 +194,8 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin
|
|||
m_params.emplace_back( new PARAM<wxString>( "net_format_name",
|
||||
&m_NetFormatName, "" ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "spice_adjust_passive_values",
|
||||
&m_SpiceAdjustPassiveValues, false ) );
|
||||
m_params.emplace_back( new PARAM<bool>( "spice_current_sheet_as_root",
|
||||
&m_SpiceCurSheetAsRoot, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "spice_save_all_voltages",
|
||||
&m_SpiceSaveAllVoltages, false ) );
|
||||
|
@ -204,6 +203,9 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin
|
|||
m_params.emplace_back( new PARAM<bool>( "spice_save_all_currents",
|
||||
&m_SpiceSaveAllCurrents, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "spice_model_current_sheet_as_root",
|
||||
&m_SpiceModelCurSheetAsRoot, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<wxString>( "spice_external_command",
|
||||
&m_SpiceCommandString, "spice \"%I\"" ) );
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ public:
|
|||
wxString m_NetFormatName;
|
||||
|
||||
///< @todo These should probably be moved to the "schematic.simulator" path.
|
||||
bool m_SpiceAdjustPassiveValues;
|
||||
bool m_SpiceCurSheetAsRoot;
|
||||
bool m_SpiceSaveAllVoltages;
|
||||
bool m_SpiceSaveAllCurrents;
|
||||
|
|
Loading…
Reference in New Issue