VirtualBox

Ignore:
Timestamp:
Nov 6, 2015 12:41:49 PM (9 years ago)
Author:
vboxsync
Message:

UIWizardNewVMPageBasic3.cpp: Treat 0 return value from GetRecommendedHDD() as no disk.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp

    r56180 r58602  
    4040
    4141UIWizardNewVMPage3::UIWizardNewVMPage3()
     42    : m_fRecommendedNoDisk(false)
    4243{
    4344}
     
    224225
    225226    /* Prepare initial choice: */
    226     m_pDiskCreate->setFocus();
    227     m_pDiskCreate->setChecked(true);
     227    if (field("type").value<CGuestOSType>().GetRecommendedHDD() != 0)
     228    {
     229        m_pDiskCreate->setFocus();
     230        m_pDiskCreate->setChecked(true);
     231        m_fRecommendedNoDisk = false;
     232    }
     233    else
     234    {
     235        m_pDiskSkip->setFocus();
     236        m_pDiskSkip->setChecked(true);
     237        m_fRecommendedNoDisk = true;
     238    }
    228239    m_pDiskSelector->setCurrentIndex(0);
    229240}
     
    255266    if (m_pDiskSkip->isChecked())
    256267    {
    257         /* Ask user about disk-less machine: */
    258         fResult = msgCenter().confirmHardDisklessMachine(thisImp());
     268        /* Ask user about disk-less machine unless that's the recommendation: */
     269        if (!m_fRecommendedNoDisk)
     270            fResult = msgCenter().confirmHardDisklessMachine(thisImp());
    259271    }
    260272    else if (m_pDiskCreate->isChecked())
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.h

    r55401 r58602  
    6767    void ensureNewVirtualDiskDeleted();
    6868
     69    /* Input: */
     70    bool m_fRecommendedNoDisk;
     71
    6972    /* Variables: */
    7073    CMedium m_virtualDisk;
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