if (!super.validateObject(editedObject, pb))
{
return false;
}
NodeSocket editedSocket = (NodeSocket) editedObject;
if (editedSocket.isDefaultSocket())
{
boolean isEntry = editedSocket.isEntrySocket();
Node node = editedSocket.getNode();
for (Iterator it = node.getSockets(); it.hasNext();)
{
NodeSocket socket = (NodeSocket) it.next();
if (socket.isEntrySocket() != isEntry)
{
// Socket type does not match
continue;
}
if (socket.isDefaultSocket())
{
// Clear the default socket flag if we are not iterating the edited socket
// (note that we also have to check the original object because the property browser
// clones the object)
if (socket != editedSocket && socket != pb.getObject() && socket != pb.getOriginalObject())
{
socket.setDefaultSocket(false);
}
}
}
}