eeschema: Add connections to sheet pins
Set the sheet pin to be a junction connection point that ensures the connectivity Fixes https://gitlab.com/kicad/code/kicad/issues/3852
This commit is contained in:
parent
f359892de3
commit
ec8a8ffcbc
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -171,8 +171,6 @@ void SCH_ITEM::SwapData( SCH_ITEM* aItem )
|
|||
|
||||
bool SCH_ITEM::operator < ( const SCH_ITEM& aItem ) const
|
||||
{
|
||||
bool retval = ( Type() < aItem.Type() );
|
||||
|
||||
if( Type() != aItem.Type() )
|
||||
return Type() < aItem.Type();
|
||||
|
||||
|
|
|
@ -357,7 +357,8 @@ bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition, bool aNew )
|
|||
lines[BUSSES].push_back( (SCH_LINE*) item );
|
||||
}
|
||||
|
||||
if( ( item->Type() == SCH_COMPONENT_T ) && ( item->IsConnected( aPosition ) ) )
|
||||
if( ( ( item->Type() == SCH_COMPONENT_T ) || ( item->Type() == SCH_SHEET_T ) )
|
||||
&& ( item->IsConnected( aPosition ) ) )
|
||||
pin_count++;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2019 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -218,6 +218,18 @@ bool SCH_SHEET::HasPin( const wxString& aName )
|
|||
}
|
||||
|
||||
|
||||
bool SCH_SHEET::doIsConnected( const wxPoint& aPosition ) const
|
||||
{
|
||||
for( SCH_SHEET_PIN* sheetPin : m_pins )
|
||||
{
|
||||
if( sheetPin->GetPosition() == aPosition )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool SCH_SHEET::IsVerticalOrientation() const
|
||||
{
|
||||
int leftRight = 0;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -559,6 +559,9 @@ protected:
|
|||
* sheet pin is added or removed.
|
||||
*/
|
||||
void renumberPins();
|
||||
|
||||
private:
|
||||
bool doIsConnected( const wxPoint& aPosition ) const override;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue