MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / apply

Method apply

SLiCAP/schematic/attribute_dialog.py:70–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 return strip_braces(self._item.params.get(k, ""))
69
70 def apply(self) -> None:
71 text = self._edit.text().strip()
72 k = self._key
73 if k == "refdes":
74 self._item.instance_id = text
75 elif k == "model":
76 self._item.model = text
77 elif k.startswith("ref "):
78 try:
79 idx = int(k.split()[1]) - 1
80 if 0 <= idx < len(self._item.refs):
81 self._item.refs[idx] = text
82 except (ValueError, IndexError):
83 pass
84 else:
85 # Parameter values are stored bare; braces are added at render/netlist.
86 self._item.params[k] = strip_braces(text)
87 self._item.prop_display[k] = (self._sv.isChecked(), self._sn.isChecked())
88 self._item._save_label_offsets()
89 self._item.update_labels()

Callers 15

iFunction · 0.45
eFunction · 0.45
uFunction · 0.45
cFunction · 0.45
dFunction · 0.45
nFunction · 0.45
rFunction · 0.45
tFunction · 0.45
oFunction · 0.45
lFunction · 0.45
SFunction · 0.45

Calls 4

strip_bracesFunction · 0.85
textMethod · 0.80
_save_label_offsetsMethod · 0.80
update_labelsMethod · 0.80

Tested by

no test coverage detected