Skip to content

Commit

Permalink
fix wrong deletion of topModule
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia authored and Julia committed Nov 15, 2023
1 parent 73afaba commit 88d3136
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/gui/src/module_widget/module_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,9 @@ namespace hal
switch(getModuleItemFromIndex(mTreeView->currentIndex())->getType())
{
case ModuleItem::TreeItemType::Module: {
auto module = gNetlist->get_module_by_id(selectedItem->id());
if((module == gNetlist->get_top_module()))
break;
gNetlistRelay->deleteModule(getModuleItemFromIndex(mTreeView->currentIndex())->id());
break;
}
Expand Down

0 comments on commit 88d3136

Please sign in to comment.