VirtualBox

Changeset 26882 in vbox for trunk/src


Ignore:
Timestamp:
Feb 27, 2010 12:02:09 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New running VM core: bug fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r26878 r26882  
    142142    }
    143143
    144     /* Get machine state: */
    145     KMachineState state = uisession()->machineState();
    146 
    147     switch (state)
     144    switch (uisession()->machineState())
    148145    {
    149146        case KMachineState_PoweredOff:
     
    175172            bool success = true;
    176173
    177             bool wasPaused = uisession()->isPaused() || state == KMachineState_Stuck;
     174            bool wasPaused = uisession()->isPaused() || uisession()->machineState() == KMachineState_Stuck;
    178175            if (!wasPaused)
    179176            {
     
    197194                    dlg.mCbDiscardCurState->setText(dlg.mCbDiscardCurState->text().arg(machine.GetCurrentSnapshot().GetName()));
    198195
    199                 if (state != KMachineState_Stuck)
     196                if (uisession()->machineState() != KMachineState_Stuck)
    200197                {
    201198                    /* Read the last user's choice for the given VM */
     
    342339            machineLogic()->setPreventAutoClose(false);
    343340
    344             if (state == KMachineState_PoweredOff ||
    345                 state == KMachineState_Saved ||
    346                 state == KMachineState_Teleported ||
    347                 state == KMachineState_Aborted)
     341            if (uisession()->machineState() == KMachineState_PoweredOff ||
     342                uisession()->machineState() == KMachineState_Saved ||
     343                uisession()->machineState() == KMachineState_Teleported ||
     344                uisession()->machineState() == KMachineState_Aborted)
    348345            {
    349346                /* The machine has been stopped while showing the Close or the Pause
     
    356353                {
    357354                    /* Restore the running state if needed */
    358                     if (!wasPaused && state == KMachineState_Paused)
     355                    if (!wasPaused && uisession()->machineState() == KMachineState_Paused)
    359356                        uisession()->unpause();
    360357                }
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