VirtualBox

Changeset 77605 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 7, 2019 4:47:51 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager UI: Chooser pane: Always choose newly added VM, not just when created by New VM wizard but also when added through .vbox file or via VBoxManage.

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

Legend:

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

    r77604 r77605  
    686686            updateLayout();
    687687
    688             /* Choose newly added item only if VM was created from the GUI side: */
    689             if (uId == m_uLastCreatedMachineId)
    690                 setCurrentItem(root()->searchForItem(comMachine.GetName(),
    691                                                      UIChooserItemSearchFlag_Machine |
    692                                                      UIChooserItemSearchFlag_ExactName));
     688            /* Choose newly added item: */
     689            setCurrentItem(root()->searchForItem(comMachine.GetName(),
     690                                                 UIChooserItemSearchFlag_Machine |
     691                                                 UIChooserItemSearchFlag_ExactName));
    693692        }
    694693    }
     
    878877    pWizard->prepare();
    879878
    880     /* Execute wizard and store created VM Id
    881      * on success for current-item handling: */
    882     if (pWizard->exec() == QDialog::Accepted)
    883         m_uLastCreatedMachineId = pWizard->createdMachineId();
     879    /* Execute wizard: */
     880    pWizard->exec();
    884881    if (pWizard)
    885882        delete pWizard;
     
    20682065    foreach (UIChooserItem *pItem, pParentItem->items(UIChooserItemType_Machine))
    20692066        orders[strExtraDataKey] << QString("m=%1").arg(toOldStyleUuid(pItem->toMachineItem()->id()));
    2070 }
     2067    }
    20712068
    20722069void UIChooserModel::makeSureGroupDefinitionsSaveIsFinished()
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h

    r77604 r77605  
    473473        /** Holds the item lookup string. */
    474474        QString  m_strLookupString;
    475 
    476         /** Holds the Id of last VM created from the GUI side. */
    477         QUuid  m_uLastCreatedMachineId;
    478475    /** @} */
    479476
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