Skip to content

Commit ace78ef

Browse files
committed
Fixes #1632
1 parent 1a9aa71 commit ace78ef

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Interface/Application/ModuleWidget.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ void PortWidgetManager::addPort(OutputPortWidget* port)
829829
void PortWidgetManager::addPort(InputPortWidget* port)
830830
{
831831
inputPorts_.push_back(port);
832+
port->setSceneFunc(getScene_);
832833
}
833834

834835
void PortWidgetManager::insertPort(int index, InputPortWidget* port)
@@ -837,6 +838,7 @@ void PortWidgetManager::insertPort(int index, InputPortWidget* port)
837838
inputPorts_.push_back(port);
838839
else
839840
inputPorts_.insert(inputPorts_.begin() + index, port);
841+
port->setSceneFunc(getScene_);
840842
}
841843

842844
void PortWidgetManager::setHighlightPorts(bool on)

src/Interface/Application/Port.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ void PortWidget::forEachPort(Func func, Pred pred)
606606

607607
void PortWidget::makePotentialConnectionLine(PortWidget* other)
608608
{
609-
if (getScene_() != other->getScene_())
609+
if (other && getScene_ && other->getScene_ && getScene_() != other->getScene_())
610610
return;
611611

612612
auto potentials = potentialConnectionsMap_[this];

0 commit comments

Comments
 (0)