From 51d335c0e831551b004d20bcf40070c91625fba4 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 8 Mar 2024 10:30:15 -0800 Subject: [PATCH] Temporary fix to disable zone-zone clearance display When selecting two objects, we display the measured clearance between them. This can be problematic with large zones as they have thousands of triangles. This is a temporary fix for 8.0.1 to disable the check until we have a performant version Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327 (cherry picked from commit 686a62cbe6e47df60b1184b2d279a7bd72af41dd) --- pcbnew/tools/pcb_control.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index af02c4ee91..14fb7b7143 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -1588,19 +1588,21 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent ) PCB_LAYER_ID layer = overlap.CuStack().front(); constraint = drcEngine->EvalRules( CLEARANCE_CONSTRAINT, a, b, layer ); - - std::shared_ptr a_shape( a_conn->GetEffectiveShape( layer ) ); - std::shared_ptr b_shape( b_conn->GetEffectiveShape( layer ) ); - - int actual_clearance = a_shape->GetClearance( b_shape.get() ); - msgItems.emplace_back( _( "Resolved clearance" ), m_frame->MessageTextFromValue( constraint.m_Value.Min() ) ); - if( actual_clearance > -1 && actual_clearance < std::numeric_limits::max() ) + if( a->Type() != PCB_ZONE_T || b->Type() != PCB_ZONE_T ) { - msgItems.emplace_back( _( "Actual clearance" ), - m_frame->MessageTextFromValue( actual_clearance ) ); + std::shared_ptr a_shape( a_conn->GetEffectiveShape( layer ) ); + std::shared_ptr b_shape( b_conn->GetEffectiveShape( layer ) ); + + int actual_clearance = a_shape->GetClearance( b_shape.get() ); + + if( actual_clearance > -1 && actual_clearance < std::numeric_limits::max() ) + { + msgItems.emplace_back( _( "Actual clearance" ), + m_frame->MessageTextFromValue( actual_clearance ) ); + } } } }