topGroup = false;
}
}
+void GroupBlock::removeAllBlocks() {
+ foreach(AbstractBlock* block, blocks) {
+ if (block->isGroupBlock()) {
+ GroupBlock* group = AB_TO_GRP(block);
+ group->removeAllBlocks();
+ }
+ removeBlock(block);
+ }
+}
void GroupBlock::removeBlock(AbstractBlock* block) {
- blocks.removeAll(block);
+ /* CAUTION: no check is done if the block has connected interface
+ or not. Thus, they must be deleted elsewhere.
+ */
+ blocks.removeAll(block);
+ delete block;
}
void GroupBlock::parametersValidation(QList<AbstractBlock *> *checkedBlocks, QList<AbstractBlock *> *blocksToConfigure) {