Hi, i'm sending this patch through the list because for some reason my
svn won't let me commit.
The patch has 2 modifications:
1) Use the correct color when dragging wires with controls, if the
type is different the port becomes red, and if is the same it becomes
green (just like ports do).
2) The FlattenedNetwork checks the connecting controls being the same
type, and if they're different it returns false and we are happy (no
assert that hangs NetworkEditor).
I'm doing some development on the MIDI plugins. I'll have news soon.
Sorry for the extended delay, but i had to record a new album with my
band and everything in my life got delayed.
Francisco
Index: NetworkEditor/src/NetworkCanvas.hxx
===================================================================
--- NetworkEditor/src/NetworkCanvas.hxx (revision 12457)
+++ NetworkEditor/src/NetworkCanvas.hxx (working copy)
@@ -1253,7 +1253,12 @@
bool canConnectControls(ProcessingBox * source, unsigned outlet, ProcessingBox * target, unsigned inlet)
{
if (networkIsDummy()) return true;
- return true;
+ //return true;
+ QString outName = source->getName() + "." + source->getOutcontrolName(outlet);
+ QString inName = target->getName() + "." + incontrolName(target->model(),inlet);
+ CLAM::OutControlBase & out = _network->GetOutControlByCompleteName(outName.toStdString());
+ CLAM::InControlBase & in = _network->GetInControlByCompleteName(inName.toStdString());
+ return out.IsLinkable(in);
}
virtual bool networkAddPortConnection(const QString & outlet, const QString & inlet)
{
Index: CLAM/src/Flow/Networks/FlattenedNetwork.cxx
===================================================================
--- CLAM/src/Flow/Networks/FlattenedNetwork.cxx (revision 12457)
+++ CLAM/src/Flow/Networks/FlattenedNetwork.cxx (working copy)
@@ -460,6 +460,9 @@
if ( outcontrol.IsConnectedTo(incontrol) )
return false;
+ if ( !outcontrol.IsLinkable(incontrol) ) //they have different type
+ return false;
+
if (!IsStopped()) Stop();
outcontrol.AddLink( incontrol );
_______________________________________________
Clam-devel mailing list
[email protected]
https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel