Changeset 78374 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
- Timestamp:
- May 3, 2019 11:41:50 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r78353 r78374 274 274 && newData.m_options.m_enmMediumType != oldData.m_options.m_enmMediumType) 275 275 { 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); 292 277 } 293 278
Note:
See TracChangeset
for help on using the changeset viewer.