Fix deletion
This commit is contained in:
parent
8a8b039dcc
commit
d29c1a5db5
2 changed files with 66 additions and 22 deletions
|
|
@ -90,6 +90,10 @@ bool WarpGraphModel::connectionPossible(
|
|||
if (connectionExists(connectionId)) {
|
||||
return false;
|
||||
}
|
||||
if (m_ghostNodes.count(connectionId.outNodeId) ||
|
||||
m_ghostNodes.count(connectionId.inNodeId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto outIt = m_nodes.find(connectionId.outNodeId);
|
||||
auto inIt = m_nodes.find(connectionId.inNodeId);
|
||||
|
|
@ -106,6 +110,14 @@ bool WarpGraphModel::connectionPossible(
|
|||
return false;
|
||||
}
|
||||
|
||||
WarpNodeType outType = classifyNode(outIt->second.info);
|
||||
WarpNodeType inType = classifyNode(inIt->second.info);
|
||||
bool outIsVideo = (outType == WarpNodeType::kVideoSource || outType == WarpNodeType::kVideoSink);
|
||||
bool inIsVideo = (inType == WarpNodeType::kVideoSource || inType == WarpNodeType::kVideoSink);
|
||||
if (outIsVideo != inIsVideo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue