EEschema, "Change To" context menu: do not allow converting SCH_SHEET_PINs

to something else.
SCH_SHEET_PIN are specific, handled by a SHEET, and the conversion to a label
cannot be done.
This commit is contained in:
jean-pierre charras 2023-01-09 15:30:36 +01:00
parent 8c8b4f43e7
commit be5810a1ce
1 changed files with 8 additions and 1 deletions

View File

@ -291,7 +291,14 @@ bool SCH_EDIT_TOOL::Init()
return false; return false;
}; };
static std::vector<KICAD_T> allTextTypes = { SCH_LABEL_LOCATE_ANY_T, SCH_TEXT_T, SCH_TEXTBOX_T }; // allTextTypes does not include SCH_SHEET_PIN_T because one cannot convert other
// types to/from this type, living only in a SHEET
static std::vector<KICAD_T> allTextTypes = { SCH_LABEL_T,
SCH_DIRECTIVE_LABEL_T,
SCH_GLOBAL_LABEL_T,
SCH_HIER_LABEL_T,
SCH_TEXT_T,
SCH_TEXTBOX_T };
auto toChangeCondition = ( E_C::OnlyTypes( allTextTypes ) ); auto toChangeCondition = ( E_C::OnlyTypes( allTextTypes ) );