VirtualBox

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


Ignore:
Timestamp:
Aug 28, 2018 2:36:07 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: Fix a bug in medium selector widget. Medium tree creation was incomplete

File:
1 edited

Legend:

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

    r73926 r73928  
    369369            else
    370370                pParentMediumItem = createHardDiskItem(parentMedium, pParent);
    371             /* If parent medium-item was found: */
    372             if (pParentMediumItem)
    373             {
    374                 pMediumItem = new UIMediumItemHD(medium, pParentMediumItem);
    375                 LogRel2(("UIMediumManager: Child hard-disk medium-item with ID={%s} created.\n", medium.id().toUtf8().constData()));
    376             }
    377             else
    378                 AssertMsgFailed(("Parent medium with ID={%s} could not be created!\n", medium.parentID().toUtf8().constData()));
    379 
    380371        }
    381     }
    382     /* Else just create item as top-level one: */
     372        if (pParentMediumItem)
     373        {
     374            pMediumItem = new UIMediumItemHD(medium, pParentMediumItem);
     375            LogRel2(("UIMediumManager: Child hard-disk medium-item with ID={%s} created.\n", medium.id().toUtf8().constData()));
     376        }
     377        else
     378            AssertMsgFailed(("Parent medium with ID={%s} could not be created!\n", medium.parentID().toUtf8().constData()));
     379    }
     380
     381    /* No parents, thus just create item as top-level one: */
    383382    else
    384383    {
     
    636635    {
    637636        UIMedium medium = vboxGlobal().medium(strMediumID);
    638 
     637        //printf("name %s\n", qPrintable(medium.name()));
    639638        if (medium.type() == m_enmMediumType)
    640639        {
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