diff --git a/src/Editor/CNodeSelection.h b/src/Editor/CNodeSelection.h index 396bb194..099c4d9b 100644 --- a/src/Editor/CNodeSelection.h +++ b/src/Editor/CNodeSelection.h @@ -6,6 +6,7 @@ #include #include #include +#include class CNodeSelection : public QObject { @@ -61,20 +62,23 @@ public: void ClearAndSelectNode(CSceneNode *pNode) { // Block signals for Clear so that Modified only emits once. - blockSignals(true); - Clear(); - blockSignals(false); + { + [[maybe_unused]] const QSignalBlocker blocker{this}; + Clear(); + } + SelectNode(pNode); } void SetSelectedNodes(const QList& rkList) { - blockSignals(true); - Clear(); + { + [[maybe_unused]] const QSignalBlocker blocker{this}; + Clear(); - for (CSceneNode *pNode : rkList) - SelectNode(pNode); - blockSignals(false); + for (CSceneNode* pNode : rkList) + SelectNode(pNode); + } mBoundsDirty = true; emit Modified();