VirtualBox

Ignore:
Timestamp:
Jul 10, 2018 8:49:42 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: Update the recent media list after floppy creation

File:
1 edited

Legend:

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

    r72927 r73018  
    181181
    182182    CVirtualBox vbox = vboxGlobal().virtualBox();
    183 
    184     CMedium newMedium = vbox.CreateMedium(mediumFormats[0].GetName(), m_pFilePathselector->path(),
     183    QString strMediumLocation = m_pFilePathselector->path();
     184
     185    CMedium newMedium = vbox.CreateMedium(mediumFormats[0].GetName(), strMediumLocation,
    185186                                          KAccessMode_ReadWrite, KDeviceType_Floppy);
    186187    if (!vbox.isOk())
    187188    {
    188         msgCenter().cannotCreateMediumStorage(vbox, m_pFilePathselector->path(), this);
     189        msgCenter().cannotCreateMediumStorage(vbox, strMediumLocation, this);
    189190        return;
    190191    }
     
    198199    if (!newMedium.isOk())
    199200    {
    200         msgCenter().cannotCreateMediumStorage(newMedium, m_pFilePathselector->path(), this);
     201        msgCenter().cannotCreateMediumStorage(newMedium, strMediumLocation, this);
    201202        return;
    202203    }
     
    208209    if (!progress.isOk() || progress.GetResultCode() != 0)
    209210    {
    210         msgCenter().cannotCreateHardDiskStorage(progress, m_pFilePathselector->path(), this);
     211        msgCenter().cannotCreateHardDiskStorage(progress, strMediumLocation, this);
    211212        return;
    212213    }
     
    216217    /* Notify VBoxGlobal about the new medium: */
    217218    vboxGlobal().createMedium(UIMedium(newMedium, UIMediumType_Floppy, KMediumState_Created));
    218 
     219    /* Notify VBoxGlobal about the new medium: */
     220    vboxGlobal().updateRecentlyUsedMediumListAndFolder(UIMediumType_Floppy, strMediumLocation);
    219221
    220222    /* After a successful creation and initilization of the floppy disk we call base class accept
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