VirtualBox

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


Ignore:
Timestamp:
Apr 23, 2020 3:07:18 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137505
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Fixing regression of r137388; There can be no machine item selected if global item is; This is a valid situation as well.

File:
1 edited

Legend:

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

    r83921 r83951  
    569569    updateActionsAppearance();
    570570
    571     /* Get selected items: */
    572     QList<UIVirtualMachineItem*> items = currentItems();
    573     AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n"));
    574     UIVirtualMachineItem *pItem = items.first();
    575 
    576     /* For local machine: */
    577     if (pItem->itemType() == UIVirtualMachineItemType_Local)
     571    /* Get first selected item: */
     572    UIVirtualMachineItem *pItem = currentItems().value(0);
     573
     574    /* For global item or local machine: */
     575    if (   !pItem
     576        || pItem->itemType() == UIVirtualMachineItemType_Local)
    578577    {
    579578        /* Open add machine dialog: */
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