From 24a3816a34a8288d8c2297a77b0a7cfac6df7ee1 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 16 Jul 2023 15:19:03 -0400 Subject: [PATCH] EDA_TEXT Orientation property shouldn't be exposed to schematics Fixes https://gitlab.com/kicad/code/kicad/-/issues/15140 --- eeschema/sch_field.cpp | 2 ++ eeschema/sch_text.cpp | 3 +++ eeschema/sch_textbox.cpp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index f98164be5b..4db1626f03 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -1194,6 +1194,8 @@ static struct SCH_FIELD_DESC propMgr.Mask( TYPE_HASH( SCH_FIELD ), TYPE_HASH( EDA_TEXT ), _HKI( "Width" ) ); propMgr.Mask( TYPE_HASH( SCH_FIELD ), TYPE_HASH( EDA_TEXT ), _HKI( "Height" ) ); + propMgr.Mask( TYPE_HASH( SCH_FIELD ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) ); + auto isNotNamedVariable = []( INSPECTABLE* aItem ) -> bool { diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index 7d004baf5b..35971a45e0 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -559,5 +559,8 @@ static struct SCH_TEXT_DESC propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Visible" ) ); propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Width" ) ); propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Height" ) ); + + // Orientation is exposed differently in schematic; mask the base for now + propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) ); } } _SCH_TEXT_DESC; diff --git a/eeschema/sch_textbox.cpp b/eeschema/sch_textbox.cpp index 0b403432df..afa2e1108d 100644 --- a/eeschema/sch_textbox.cpp +++ b/eeschema/sch_textbox.cpp @@ -483,5 +483,7 @@ static struct SCH_TEXTBOX_DESC propMgr.Mask( TYPE_HASH( SCH_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "End X" ) ); propMgr.Mask( TYPE_HASH( SCH_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "End Y" ) ); propMgr.Mask( TYPE_HASH( SCH_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "Line Width" ) ); + + propMgr.Mask( TYPE_HASH( SCH_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) ); } } _SCH_TEXTBOX_DESC;