Put Repair Schematic behind Advanced Config.
This commit is contained in:
parent
f3b3d18319
commit
5863bc0937
|
@ -177,6 +177,8 @@ static const wxChar HideVersionFromTitle[] = wxT( "HideVersionFromTitle" );
|
|||
|
||||
static const wxChar TraceMasks[] = wxT( "TraceMasks" );
|
||||
|
||||
static const wxChar ShowRepairSchematic[] = wxT( "ShowRepairSchematic" );
|
||||
|
||||
} // namespace KEYS
|
||||
|
||||
|
||||
|
@ -395,6 +397,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::HideVersionFromTitle,
|
||||
&m_HideVersionFromTitle, false ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowRepairSchematic,
|
||||
&m_ShowRepairSchematic, false ) );
|
||||
|
||||
// Special case for trace mask setting...we just grab them and set them immediately
|
||||
// Because we even use wxLogTrace inside of advanced config
|
||||
wxString traceMasks = "";
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "eeschema_id.h"
|
||||
#include "sch_edit_frame.h"
|
||||
#include <widgets/wx_menubar.h>
|
||||
#include <advanced_config.h>
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::ReCreateMenuBar()
|
||||
|
@ -252,7 +253,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
|||
toolsMenu->AppendSeparator();
|
||||
toolsMenu->Add( EE_ACTIONS::rescueSymbols );
|
||||
toolsMenu->Add( EE_ACTIONS::remapSymbols );
|
||||
toolsMenu->Add( EE_ACTIONS::repairSchematic );
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_ShowRepairSchematic )
|
||||
toolsMenu->Add( EE_ACTIONS::repairSchematic );
|
||||
|
||||
toolsMenu->AppendSeparator();
|
||||
toolsMenu->Add( EE_ACTIONS::editSymbolFields );
|
||||
|
|
|
@ -2191,11 +2191,11 @@ int SCH_EDITOR_CONTROL::RepairSchematic( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
SCH_SCREEN* screen = sheet.LastScreen();
|
||||
|
||||
for( SCH_ITEM* aItem : screen->Items().OfType( SCH_SYMBOL_T ) )
|
||||
for( SCH_ITEM* item : screen->Items().OfType( SCH_SYMBOL_T ) )
|
||||
{
|
||||
processItem( aItem );
|
||||
processItem( item );
|
||||
|
||||
for( SCH_PIN* pin : static_cast<SCH_SYMBOL*>( aItem )->GetPins( &sheet ) )
|
||||
for( SCH_PIN* pin : static_cast<SCH_SYMBOL*>( item )->GetPins( &sheet ) )
|
||||
processItem( pin );
|
||||
}
|
||||
}
|
||||
|
@ -2204,14 +2204,14 @@ int SCH_EDITOR_CONTROL::RepairSchematic( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
SCH_SCREEN* screen = sheet.LastScreen();
|
||||
|
||||
for( SCH_ITEM* aItem : screen->Items() )
|
||||
for( SCH_ITEM* item : screen->Items() )
|
||||
{
|
||||
processItem( aItem );
|
||||
processItem( item );
|
||||
|
||||
aItem->RunOnChildren(
|
||||
item->RunOnChildren(
|
||||
[&]( SCH_ITEM* aChild )
|
||||
{
|
||||
processItem( aItem );
|
||||
processItem( item );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,6 +195,8 @@ public:
|
|||
*/
|
||||
bool m_HideVersionFromTitle;
|
||||
|
||||
bool m_ShowRepairSchematic;
|
||||
|
||||
private:
|
||||
ADVANCED_CFG();
|
||||
|
||||
|
|
Loading…
Reference in New Issue