From be0a9e2738f5ff0ba751d56c335cb621b3f27544 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 13 Feb 2023 18:38:43 +0000 Subject: [PATCH] Handle SPICE prefixes for operating point data. Also adjusts the min-pin lenght as some symbols have very short pins. --- eeschema/sch_edit_frame.cpp | 4 ++++ eeschema/sch_painter.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 5a768f4bc5..f02c862ff5 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1352,6 +1352,10 @@ void SCH_EDIT_FRAME::RefreshOperatingPointDisplay() { SIM_MODEL& model = simLibMgr.CreateModel( &GetCurrentSheet(), *symbol ).model; + SPICE_ITEM spiceItem; + spiceItem.refName = ref; + ref = model.SpiceGenerator().ItemName( spiceItem ); + for( const auto& modelPin : model.GetPins() ) { SCH_PIN* symbolPin = symbol->GetPin( modelPin.get().symbolPinNumber ); diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 129d89e7b0..96ba97db8b 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1357,7 +1357,7 @@ void SCH_PAINTER::draw( const LIB_PIN *aPin, int aLayer, bool aDimmed ) int textOffset = KiROUND( textSize * 0.22 ); TEXT_ATTRIBUTES attrs; - if( len > KiROUND( textSize * 1.8 ) ) + if( len > textSize ) { if( dir.x == 0 ) {