Show pin dangling symbols in Symbol Editor.

Even though we don't have connections they're a still a good visual
indication of which end of the pin is which.

Fixes https://gitlab.com/kicad/code/kicad/issues/10742

(cherry picked from commit aedfe08bad)
This commit is contained in:
Jeff Young 2022-02-06 17:45:17 +00:00
parent f561f85ebb
commit b8b9f646c6
2 changed files with 13 additions and 0 deletions

View File

@ -1061,6 +1061,17 @@ void LIB_PIN::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
}
void LIB_PIN::ViewGetLayers( int aLayers[], int& aCount ) const
{
aCount = 3;
aLayers[0] = LAYER_DANGLING; // We don't really show dangling vs non-dangling (since there
// are no connections in the symbol editor), but it's still
// a good visual indication of which end of the pin is which.
aLayers[1] = LAYER_DEVICE;
aLayers[2] = LAYER_SELECTION_SHADOWS;
}
const EDA_RECT LIB_PIN::GetBoundingBox( bool aIncludeInvisibles, bool aPinOnly ) const
{
EDA_RECT bbox;

View File

@ -170,6 +170,8 @@ public:
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
void ViewGetLayers( int aLayers[], int& aCount ) const override;
/* Cannot use a default parameter here as it will not be compatible with the virtual. */
const EDA_RECT GetBoundingBox() const override { return GetBoundingBox( false ); }