Changed logic of invisible to a (forced) visibility field

This commit is contained in:
Jan Böhmer 2023-12-03 15:29:17 +01:00
parent bc37d11f13
commit 7d69d6ba30
9 changed files with 37 additions and 29 deletions

View file

@ -80,7 +80,7 @@ class KiCadHelper
$result = [];
foreach ($categories as $category) {
//Skip invisible categories
if ($category->getEdaInfo()->getInvisible() ?? false) {
if ($category->getEdaInfo()->getVisibility() === false) {
continue;
}
@ -146,7 +146,7 @@ class KiCadHelper
$result = [];
foreach ($parts as $part) {
//If the part is invisible, then skip it
if ($part->getEdaInfo()->getInvisible() ?? $part->getCategory()?->getEdaInfo()->getInvisible() ?? false) {
if ($part->getEdaInfo()->getVisibility() === false || $part->getCategory()?->getEdaInfo()->getVisibility() === false) {
continue;
}