MCPcopy Create free account
hub / github.com/LibrePCB/LibrePCB / performExecute

Method performExecute

libs/librepcb/editor/cmd/cmdattributeedit.cpp:81–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 ******************************************************************************/
80
81bool CmdAttributeEdit::performExecute() {
82 bool modified = false;
83 // Set type/value/unit before key for exception safety (setTypeValueUnit() can
84 // throw, but setKey() not)!
85 if (mAttribute.setTypeValueUnit(*mNewType, mNewValue, mNewUnit)) {
86 modified = true;
87 }
88 if (mAttribute.setKey(mNewKey)) {
89 modified = true;
90 }
91 return modified;
92}
93
94void CmdAttributeEdit::performUndo() {
95 mAttribute.setTypeValueUnit(*mOldType, mOldValue, mOldUnit);

Callers

nothing calls this directly

Calls 2

setTypeValueUnitMethod · 0.80
setKeyMethod · 0.45

Tested by

no test coverage detected