VirtualBox

Ignore:
Timestamp:
May 3, 2019 11:41:50 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8400. Reataching the medium to the vms after a medium type change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r78353 r78374  
    274274        && newData.m_options.m_enmMediumType != oldData.m_options.m_enmMediumType)
    275275    {
    276         /* Check if we need to release medium first: */
    277         bool fDo = true;
    278         if (   pMediumItem->machineIds().size() > 1
    279             || (   (   newData.m_options.m_enmMediumType == KMediumType_Immutable
    280                     || newData.m_options.m_enmMediumType == KMediumType_MultiAttach)
    281                 && pMediumItem->machineIds().size() > 0))
    282             fDo = pMediumItem->release(true);
    283 
    284         if (fDo)
    285         {
    286             comMedium.SetType(newData.m_options.m_enmMediumType);
    287 
    288             /* Show error message if necessary: */
    289             if (!comMedium.isOk())
    290                 msgCenter().cannotChangeMediumType(comMedium, oldData.m_options.m_enmMediumType, newData.m_options.m_enmMediumType, this);
    291         }
     276        pMediumItem->changeMediumType(oldData.m_options.m_enmMediumType, newData.m_options.m_enmMediumType);
    292277    }
    293278
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette