VirtualBox

Changeset 37445 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jun 14, 2011 2:40:45 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72251
Message:

FE/Qt: Do not add cloned medium into internal registry, closing it at the end.

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

Legend:

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

    r37406 r37445  
    10551055                         0 /* default size, not important for copying */,
    10561056                         pItem->medium().medium() /* base medium for copying */);
    1057 
    1058     if (wizard.exec() == QDialog::Accepted)
    1059     {
    1060         /* Search for the newly created hard disk: */
    1061         MediaItem *pItem = searchItem(mTwHD, wizard.hardDisk().GetId());
    1062         AssertReturnVoid(pItem);
    1063         /* Select the newly created hard disk: */
    1064         mTwHD->setCurrentItem(pItem);
    1065     }
     1057    wizard.exec();
    10661058}
    10671059
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWizard.cpp

    r37407 r37445  
    969969    }
    970970
    971     /* Inform everybody there is a new medium: */
     971    /* Assign hardDisk field value: */
    972972    m_hardDisk = hardDisk;
    973     vboxGlobal().addMedium(VBoxMedium(m_hardDisk, VBoxDefs::MediumType_HardDisk, KMediumState_Created));
     973
     974    /* Depending on dialog type: */
     975    switch (wizardType())
     976    {
     977        case UINewHDWizardType_Creating:
     978        {
     979            /* Inform everybody there is a new medium: */
     980            vboxGlobal().addMedium(VBoxMedium(m_hardDisk, VBoxDefs::MediumType_HardDisk, KMediumState_Created));
     981            break;
     982        }
     983        case UINewHDWizardType_Copying:
     984        {
     985            /* Just close the clone medium, it is not necessary yet: */
     986            m_hardDisk.Close();
     987            break;
     988        }
     989        default:
     990            return false;
     991    }
    974992
    975993    return true;
Note: See TracChangeset for help on using the changeset viewer.

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