ADDED: expand VARIANT and VARIANT_DESC in drawing sheets

* add VARIANT and VARIANT_DESC to the list of known vars in the drawing
  sheet editor.
* cache variant and variant description in respective objects.
* expand the respective text variables when building the drawing sheet.
* keep the cached variant and its description up-to-date when selecting
  a variant in the GUI.
* pass variant and its description to the plotters.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23430
This commit is contained in:
Bernhard Kirchen
2026-03-17 15:39:34 +00:00
committed by Jeff Young
parent a9f1b41dc2
commit e3f049f4d9
16 changed files with 141 additions and 41 deletions
+4 -3
View File
@@ -734,10 +734,11 @@ protected: // variables used in most of plotters:
class TITLE_BLOCK;
void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BLOCK& aTitleBlock,
const PAGE_INFO& aPageInfo, const std::map<wxString, wxString>*aProperties,
const PAGE_INFO& aPageInfo, const std::map<wxString, wxString>* aProperties,
const wxString& aSheetNumber, int aSheetCount, const wxString& aSheetName,
const wxString& aSheetPath, const wxString& aFilename,
COLOR4D aColor = COLOR4D::UNSPECIFIED, bool aIsFirstPage = true );
const wxString& aSheetPath, const wxString& aFilename, COLOR4D aColor = COLOR4D::UNSPECIFIED,
bool aIsFirstPage = true, const wxString& aVariantName = wxEmptyString,
const wxString& aVariantDesc = wxEmptyString );
/**
* Return the default plot extension for a format.