VirtualBox

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


Ignore:
Timestamp:
Jul 8, 2021 9:43:15 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145588
Message:

FE/Qt: bugref:5117: VirtualBox Manager: Make sure state discarding e-data flag is taken into account when VM being powered off from manager as well.

File:
1 edited

Legend:

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

    r90041 r90089  
    19351935    foreach (UIVirtualMachineItem *pItem, itemsToPowerOff)
    19361936    {
     1937        /* Sanity check: */
     1938        AssertPtrReturnVoid(pItem);
     1939
    19371940        /* For local machine: */
    19381941        if (pItem->itemType() == UIVirtualMachineItemType_Local)
     
    19551958                if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    19561959                    msgCenter().cannotPowerDownMachine(comProgress, pItem->name());
     1960                else
     1961                {
     1962                    /* Sanity check: */
     1963                    AssertPtrReturnVoid(pItem->toLocal());
     1964                    /* Restore snapshot if requested: */
     1965                    const bool fDiscardStateOnPowerOff = gEDataManager->discardStateOnPowerOff(pItem->id());
     1966                    if (fDiscardStateOnPowerOff && pItem->toLocal()->snapshotCount() > 0)
     1967                        uiCommon().restoreCurrentSnapshot(pItem->id());
     1968                }
    19571969            }
    19581970
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