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

Method _on_save_as

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

Source from the content-addressed store, hash-verified

683 self._save_to(self._current_path)
684
685 def _on_save_as(self):
686 if self._doc_props.is_subcircuit:
687 self._save_subcircuit()
688 return
689 path, _ = QFileDialog.getSaveFileName(
690 self, "Save Schematic", str(project.subdir("sch")), _FILE_FILTER
691 )
692 if not path:
693 return
694 p = Path(path)
695 if p.suffix.lower() != ".slicap_sch":
696 p = p.with_suffix(".slicap_sch")
697 self._save_to(p)
698
699 def _save_subcircuit(self):
700 """Save the schematic as a SLiCAP subcircuit: write both <title>.slicap_sch

Callers 2

_on_saveMethod · 0.95
closeEventMethod · 0.95

Calls 2

_save_subcircuitMethod · 0.95
_save_toMethod · 0.95

Tested by

no test coverage detected