- Timestamp:
- May 16, 2019 12:47:28 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 130591
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r78542 r78545 1698 1698 if (pItem->rtti() == AbstractItem::Type_ControllerItem) 1699 1699 { 1700 /* Acquire controller item and requested storage bus type: */ 1700 1701 ControllerItem *pItemController = static_cast<ControllerItem*>(pItem); 1701 1702 const KStorageBus enmNewCtrBusType = aValue.value<KStorageBus>(); … … 1729 1730 } 1730 1731 1732 /* Push new controller type: */ 1731 1733 pItemController->setCtrBusType(enmNewCtrBusType); 1732 1734 emit dataChanged(aIndex, aIndex); 1735 1736 /* Make sure each of remaining attachments has valid slot: */ 1737 foreach (AbstractItem *pChildItem, pItemController->attachments()) 1738 { 1739 AttachmentItem *pChildItemAttachment = static_cast<AttachmentItem*>(pChildItem); 1740 const SlotsList availableSlots = pChildItemAttachment->attSlots(); 1741 const StorageSlot currentSlot = pChildItemAttachment->attSlot(); 1742 if (!availableSlots.isEmpty() && !availableSlots.contains(currentSlot)) 1743 pChildItemAttachment->setAttSlot(availableSlots.first()); 1744 } 1745 1746 /* This means success: */ 1733 1747 return true; 1734 1748 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r78539 r78545 281 281 QList<QUuid> attachmentIDs(KDeviceType enmType = KDeviceType_Null) const; 282 282 283 QList<AbstractItem*> attachments() const { return mAttachments; } 283 284 void setAttachments(const QList<AbstractItem*> &attachments) { mAttachments = attachments; } 284 285
Note:
See TracChangeset
for help on using the changeset viewer.