VirtualBox

Ignore:
Timestamp:
Mar 12, 2010 1:27:19 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58752
Message:

FE/Qt4: New running VM core: make sure mode (fullscreen/seamless) actions have correct state on creating/deleting visual state objects.

File:
1 edited

Legend:

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

    r27311 r27328  
    161161    /* Fullscreen visual state holder constructor: */
    162162    UIVisualStateFullscreen(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
    163         : UIVisualState(pParent, pSession, pActionsPool) {}
     163        : UIVisualState(pParent, pSession, pActionsPool)
     164    {
     165        /* This visual state should take care of own action: */
     166        QAction *pActionFullscreen = m_pActionsPool->action(UIActionIndex_Toggle_Fullscreen);
     167        if (!pActionFullscreen->isChecked())
     168        {
     169            pActionFullscreen->blockSignals(true);
     170            pActionFullscreen->setChecked(true);
     171            pActionFullscreen->blockSignals(false);
     172        }
     173    }
    164174
    165175    /* Fullscreen visual state holder destructor: */
     
    213223    /* Seamless visual state holder constructor: */
    214224    UIVisualStateSeamless(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
    215         : UIVisualState(pParent, pSession, pActionsPool) {}
     225        : UIVisualState(pParent, pSession, pActionsPool)
     226    {
     227        /* This visual state should take care of own action: */
     228        QAction *pActionSeamless = m_pActionsPool->action(UIActionIndex_Toggle_Seamless);
     229        if (pActionSeamless->isChecked())
     230        {
     231            pActionSeamless->blockSignals(true);
     232            pActionSeamless->setChecked(true);
     233            pActionSeamless->blockSignals(false);
     234        }
     235    }
    216236
    217237    /* Seamless visual state holder destructor: */
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