diff --git a/plugins/gui/src/module_widget/module_widget.cpp b/plugins/gui/src/module_widget/module_widget.cpp index 251a5b5bdd3..d8089ed3ba0 100644 --- a/plugins/gui/src/module_widget/module_widget.cpp +++ b/plugins/gui/src/module_widget/module_widget.cpp @@ -276,8 +276,8 @@ namespace hal u32 module_id = getModuleItemFromIndex(index)->id(); auto module = gNetlist->get_module_by_id(module_id); - /*if(!(module == gNetlist->get_top_module()) && type == ModuleItem::TreeItemType::Module) - context_menu.addAction(&delete_action);*/ + if(!(module == gNetlist->get_top_module()) && type == ModuleItem::TreeItemType::Module) + context_menu.addAction(&delete_action); QAction* clicked = context_menu.exec(mTreeView->viewport()->mapToGlobal(point)); @@ -327,7 +327,7 @@ namespace hal gNetlistRelay->changeModuleColor(getModuleItemFromIndex(index)->id()); if (clicked == &delete_action){ - //gNetlistRelay->deleteModule(getModuleItemFromIndex(index)->id()); + gNetlistRelay->deleteModule(getModuleItemFromIndex(index)->id()); } if (clicked == &focus_in_view){ @@ -616,7 +616,7 @@ namespace hal switch(getModuleItemFromIndex(mTreeView->currentIndex())->getType()) { case ModuleItem::TreeItemType::Module: { - //gNetlistRelay->deleteModule(getModuleItemFromIndex(mTreeView->currentIndex())->id()); + gNetlistRelay->deleteModule(getModuleItemFromIndex(mTreeView->currentIndex())->id()); break; } case ModuleItem::TreeItemType::Gate: break;