VirtualBox

Changeset 50287 in vbox for trunk/src


Ignore:
Timestamp:
Jan 30, 2014 2:06:19 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Machine settings: Storage page: Safe attachment parameters saving.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r50272 r50287  
    36153615                if (attachmentDeviceType == KDeviceType_DVD)
    36163616                {
    3617                     if (fSuccess)
     3617                    if (fSuccess && isMachineOffline())
    36183618                    {
    36193619                        m_machine.PassthroughDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentPassthrough);
     
    36213621                        fSuccess = m_machine.isOk();
    36223622                    }
    3623                     if (fSuccess)
     3623                    if (fSuccess && isMachineInValidMode())
    36243624                    {
    36253625                        m_machine.TemporaryEjectDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentTempEject);
     
    36303630                else if (attachmentDeviceType == KDeviceType_HardDisk)
    36313631                {
    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);
    36333642                    /* Check that machine is OK: */
    36343643                    fSuccess = m_machine.isOk();
    36353644                }
    3636                 m_machine.SetHotPluggableForDevice(strControllerName, iAttachmentPort, iAttachmentDevice, fAttachmentHotPluggable);
    3637                 /* Check that machine is OK: */
    3638                 fSuccess = m_machine.isOk();
    36393645            }
    36403646            else
     
    37173723                    }
    37183724                }
    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                }
    37223731            }
    37233732            else
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