MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _on_preferences

Method _on_preferences

SLiCAP/schematic/window.py:818–827  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

816 )
817
818 def _on_preferences(self):
819 from .preferences_dialog import PreferencesDialog
820 import SLiCAP.schematic.config as _config
821 dlg = PreferencesDialog(self)
822 if dlg.exec():
823 dlg.save() # applies the new style live
824 if self._current_path is not None:
825 _config.write(project.ini_path()) # flush to disk: _activate_context reloads on focus-in
826 self._scene.from_data(self._scene.to_data(), self._library)
827 self._dirty = True # style is part of the schematic now
828
829 def _default_export_path(self, subdir: str, ext: str) -> str:
830 """Default save path for an export: <schematic stem><ext> in *subdir*.

Callers

nothing calls this directly

Calls 5

saveMethod · 0.95
PreferencesDialogClass · 0.85
writeMethod · 0.80
from_dataMethod · 0.80
to_dataMethod · 0.80

Tested by

no test coverage detected