Skip to content

Commit fd8751e

Browse files
committed
Execute works most of the time
1 parent dbeffda commit fd8751e

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/Interface/Application/NetworkEditor.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,6 @@ void NetworkEditor::addNewModuleAtPosition(const QPointF& position)
666666

667667
void NetworkEditor::addModuleViaDoubleClickedTreeItem()
668668
{
669-
qDebug() << "addModuleViaDoubleClickedTreeItem" << this << parentNetwork_;
670669
if (parentNetwork_)
671670
return;
672671

@@ -1242,8 +1241,15 @@ void NetworkEditor::executeModule(const ModuleHandle& module, bool fromButton)
12421241

12431242
ExecutableObject* NetworkEditor::lookupExecutable(const ModuleId& id) const
12441243
{
1244+
for (const auto& child : childrenNetworks_)
1245+
{
1246+
auto exec = child.second->get()->lookupExecutable(id);
1247+
if (exec)
1248+
return exec;
1249+
}
1250+
12451251
auto widget = findById(scene_->items(), id.id_);
1246-
return widget ? widget->getModuleWidget() : 0;
1252+
return widget ? widget->getModuleWidget() : nullptr;
12471253
}
12481254

12491255
void NetworkEditor::resetNetworkDueToCycle()

src/Interface/Application/Subnetworks.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ using namespace SCIRun::Dataflow::Engine;
5353

5454
NetworkEditor::~NetworkEditor()
5555
{
56+
sendItemsToParent();
57+
58+
for (auto& child : childrenNetworks_)
59+
{
60+
delete child.second->get();
61+
child.second = nullptr;
62+
}
63+
5664
Q_FOREACH(QGraphicsItem* item, scene_->items())
5765
{
5866
auto module = getModule(item);

0 commit comments

Comments
 (0)