- if(fromInterfaceItem->owner->isGroupItem()){
- switch(fromInterfaceItem->getOrientation()){
- case Parameters::North :
- oriFrom = Parameters::South;
- break;
- case Parameters::South :
- oriFrom = Parameters::North;
- break;
- case Parameters::East :
- oriFrom = Parameters::West;
- break;
- case Parameters::West :
- oriFrom = Parameters::East;
- break;
- }
- }
- if(toInterfaceItem->owner->isGroupItem()){
- switch(toInterfaceItem->getOrientation()){
- case Parameters::North :
- oriTo = Parameters::South;
- break;
- case Parameters::South :
- oriTo = Parameters::North;
- break;
- case Parameters::East :
- oriTo = Parameters::West;
- break;
- case Parameters::West :
- oriTo = Parameters::East;
- break;
+ if (withinGroup) {
+ if(fromInterfaceItem->owner->isGroupItem()){
+ switch(fromInterfaceItem->getOrientation()){
+ case Parameters::North :
+ oriFrom = Parameters::South;
+ break;
+ case Parameters::South :
+ oriFrom = Parameters::North;
+ break;
+ case Parameters::East :
+ oriFrom = Parameters::West;
+ break;
+ case Parameters::West :
+ oriFrom = Parameters::East;
+ break;
+ }
+ }
+ else if(toInterfaceItem->owner->isGroupItem()){
+ switch(toInterfaceItem->getOrientation()){
+ case Parameters::North :
+ oriTo = Parameters::South;
+ break;
+ case Parameters::South :
+ oriTo = Parameters::North;
+ break;
+ case Parameters::East :
+ oriTo = Parameters::West;
+ break;
+ case Parameters::West :
+ oriTo = Parameters::East;
+ break;
+ }