From 9b253fbdd7bab10b2ed514bdb52b95d30e0f99b4 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 10 Apr 2025 14:09:47 +0100 Subject: [PATCH] Resolve fonts for tablecells. Fixes https://gitlab.com/kicad/code/kicad/-/issues/20605 --- pcbnew/pcb_table.cpp | 11 +++++++++++ pcbnew/pcb_table.h | 1 + 2 files changed, 12 insertions(+) diff --git a/pcbnew/pcb_table.cpp b/pcbnew/pcb_table.cpp index 7ddbda392c..55bcea2b70 100644 --- a/pcbnew/pcb_table.cpp +++ b/pcbnew/pcb_table.cpp @@ -225,6 +225,17 @@ void PCB_TABLE::RunOnChildren( const std::function& aFuncti } +void PCB_TABLE::RunOnDescendants( const std::function& aFunction, int aDepth ) const +{ + for( PCB_TABLECELL* cell : m_cells ) + { + aFunction( cell ); + + cell->RunOnDescendants( aFunction, aDepth + 1 ); + } +} + + const BOX2I PCB_TABLE::GetBoundingBox() const { // Note: a table with no cells is not allowed diff --git a/pcbnew/pcb_table.h b/pcbnew/pcb_table.h index 34c6cefdaa..6c07d35c4b 100644 --- a/pcbnew/pcb_table.h +++ b/pcbnew/pcb_table.h @@ -98,6 +98,7 @@ public: bool StrokeRows() const { return m_strokeRows; } void RunOnChildren( const std::function& aFunction ) const override; + void RunOnDescendants( const std::function& aFunction, int aDepth = 0 ) const override; void SetPosition( const VECTOR2I& aPos ) override; VECTOR2I GetPosition() const override;