Changeset 84574 in vbox
- Timestamp:
- May 27, 2020 4:50:49 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138304
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r84569 r84574 597 597 return; 598 598 599 /* Check if we have collisions with our potential siblings: */599 /* Check if we have collisions between disbandable group children and their potential siblings: */ 600 600 UIChooserItem *pCurrentItem = currentItem(); 601 601 UIChooserNode *pCurrentNode = pCurrentItem->node(); … … 605 605 foreach (UIChooserNode *pChildNode, pCurrentNode->nodes()) 606 606 { 607 /* Acquire disbandable group child name to check for collision with group siblings: */ 607 608 const QString strChildName = pChildNode->name(); 608 609 UIChooserNode *pCollisionSibling = 0; 610 /* And then compare this child name with all the sibling names: */ 609 611 foreach (UIChooserNode *pSiblingNode, pParentNode->nodes()) 612 { 613 /* There can't be a collision between local child and cloud provider sibling: */ 614 if ( pSiblingNode->type() == UIChooserNodeType_Group 615 && pSiblingNode->toGroupNode()->groupType() == UIChooserNodeGroupType_Provider) 616 continue; 617 /* If sibling isn't disbandable group itself and has name similar to one of group children: */ 610 618 if (pSiblingNode != pCurrentNode && pSiblingNode->name() == strChildName) 611 619 { 620 /* We have a collision sibling: */ 612 621 pCollisionSibling = pSiblingNode; 613 622 break; 614 623 } 624 } 625 /* If there is a collision sibling: */ 615 626 if (pCollisionSibling) 616 627 { 617 628 switch (pChildNode->type()) 618 629 { 630 /* We can't resolve collision automatically for VMs: */ 619 631 case UIChooserNodeType_Machine: 620 632 { … … 622 634 return; 623 635 } 636 /* But we can do it for VM groups: */ 624 637 case UIChooserNodeType_Group: 625 638 {
Note:
See TracChangeset
for help on using the changeset viewer.