- Timestamp:
- Jan 30, 2014 2:06:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r50272 r50287 3615 3615 if (attachmentDeviceType == KDeviceType_DVD) 3616 3616 { 3617 if (fSuccess )3617 if (fSuccess && isMachineOffline()) 3618 3618 { 3619 3619 m_machine.PassthroughDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentPassthrough); … … 3621 3621 fSuccess = m_machine.isOk(); 3622 3622 } 3623 if (fSuccess )3623 if (fSuccess && isMachineInValidMode()) 3624 3624 { 3625 3625 m_machine.TemporaryEjectDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentTempEject); … … 3630 3630 else if (attachmentDeviceType == KDeviceType_HardDisk) 3631 3631 { 3632 m_machine.NonRotationalDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentNonRotational); 3632 if (fSuccess && isMachineOffline()) 3633 { 3634 m_machine.NonRotationalDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentNonRotational); 3635 /* Check that machine is OK: */ 3636 fSuccess = m_machine.isOk(); 3637 } 3638 } 3639 if (fSuccess && isMachineOffline()) 3640 { 3641 m_machine.SetHotPluggableForDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentHotPluggable); 3633 3642 /* Check that machine is OK: */ 3634 3643 fSuccess = m_machine.isOk(); 3635 3644 } 3636 m_machine.SetHotPluggableForDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentHotPluggable);3637 /* Check that machine is OK: */3638 fSuccess = m_machine.isOk();3639 3645 } 3640 3646 else … … 3717 3723 } 3718 3724 } 3719 m_machine.SetHotPluggableForDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentHotPluggable); 3720 /* Check that machine is OK: */ 3721 fSuccess = m_machine.isOk(); 3725 if (fSuccess && isMachineOffline()) 3726 { 3727 m_machine.SetHotPluggableForDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentHotPluggable); 3728 /* Check that machine is OK: */ 3729 fSuccess = m_machine.isOk(); 3730 } 3722 3731 } 3723 3732 else
Note:
See TracChangeset
for help on using the changeset viewer.