From 463d7b89f62eb59a7b7da324763202a8b7010c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 7 Mar 2026 19:45:09 +0100 Subject: [PATCH] Added part description as property to KiCad response, to show it also in Kicad 9.0.5 and 9.06 Fixes #1291 --- src/Services/EDA/KiCadHelper.php | 1 + tests/Controller/KiCadApiControllerTest.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Services/EDA/KiCadHelper.php b/src/Services/EDA/KiCadHelper.php index be4532ce..42cc2518 100644 --- a/src/Services/EDA/KiCadHelper.php +++ b/src/Services/EDA/KiCadHelper.php @@ -202,6 +202,7 @@ class KiCadHelper "exclude_from_bom" => $this->boolToKicadBool($part->getEdaInfo()->getExcludeFromBom() ?? $part->getCategory()?->getEdaInfo()->getExcludeFromBom() ?? false), "exclude_from_board" => $this->boolToKicadBool($part->getEdaInfo()->getExcludeFromBoard() ?? $part->getCategory()?->getEdaInfo()->getExcludeFromBoard() ?? false), "exclude_from_sim" => $this->boolToKicadBool($part->getEdaInfo()->getExcludeFromSim() ?? $part->getCategory()?->getEdaInfo()->getExcludeFromSim() ?? false), + "description" => $part->getDescription(), "fields" => [] ]; diff --git a/tests/Controller/KiCadApiControllerTest.php b/tests/Controller/KiCadApiControllerTest.php index 26a47032..8e55de85 100644 --- a/tests/Controller/KiCadApiControllerTest.php +++ b/tests/Controller/KiCadApiControllerTest.php @@ -121,6 +121,7 @@ final class KiCadApiControllerTest extends WebTestCase 'exclude_from_bom' => 'False', 'exclude_from_board' => 'True', 'exclude_from_sim' => 'False', + 'description' => '', 'fields' => array( 'footprint' => @@ -203,6 +204,7 @@ final class KiCadApiControllerTest extends WebTestCase 'exclude_from_bom' => 'False', 'exclude_from_board' => 'True', 'exclude_from_sim' => 'False', + 'description' => '', 'fields' => array ( 'footprint' => @@ -318,4 +320,4 @@ final class KiCadApiControllerTest extends WebTestCase self::assertResponseStatusCodeSame(304); } -} \ No newline at end of file +}