Load global defaults (style.ini), then a schematic's overrides on top. The global style.ini is the template for new schematics; an opened schematic's `` .ini`` (a full style snapshot) overrides it so the drawing always looks as it did when saved, regardless of this machine's gl
(schematic_ini=None)
| 159 | |
| 160 | |
| 161 | def load(schematic_ini=None) -> None: |
| 162 | """Load global defaults (style.ini), then a schematic's overrides on top. |
| 163 | |
| 164 | The global style.ini is the template for new schematics; an opened |
| 165 | schematic's ``<name>.ini`` (a full style snapshot) overrides it so the |
| 166 | drawing always looks as it did when saved, regardless of this machine's |
| 167 | global defaults. |
| 168 | """ |
| 169 | _cfg.clear() |
| 170 | _cfg.read(STYLE_FILE) |
| 171 | if schematic_ini is not None and Path(schematic_ini).is_file(): |
| 172 | _cfg.read(str(schematic_ini)) |
| 173 | _apply() |
| 174 | |
| 175 | |
| 176 | def reload() -> None: |