VirtualBox

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


Ignore:
Timestamp:
Aug 18, 2017 10:33:01 AM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6669: macOS: Make sure New VM wizard is using proper widget stacking (necessary for macOS sheets to avoid modal loop hang).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r65632 r68459  
    4646# include "UISelectorWindow.h"
    4747# include "UIVirtualBoxEventHandler.h"
     48# include "UIModalWindowManager.h"
    4849
    4950/* COM includes: */
     
    889890        strGroupName = pGroup->fullName();
    890891
    891     /* Prepare the new VM wizard: */
    892     UISafePointerWizardNewVM pWizard = new UIWizardNewVM(m_pChooser->selector(), strGroupName);
     892    /* Lock the action preventing cascade calls: */
     893    actionPool()->action(UIActionIndexST_M_Machine_S_New)->setEnabled(false);
     894    actionPool()->action(UIActionIndexST_M_Group_S_New)->setEnabled(false);
     895
     896    /* Use the "safe way" to open stack of Mac OS X Sheets: */
     897    QWidget *pWizardParent = windowManager().realParentWindow(m_pChooser->selector());
     898    UISafePointerWizardNewVM pWizard = new UIWizardNewVM(pWizardParent, strGroupName);
     899    windowManager().registerNewParent(pWizard, pWizardParent);
    893900    pWizard->prepare();
    894901
     
    900907    if (pWizard)
    901908        delete pWizard;
     909
     910    /* Unlock the action allowing further calls: */
     911    actionPool()->action(UIActionIndexST_M_Machine_S_New)->setEnabled(true);
     912    actionPool()->action(UIActionIndexST_M_Group_S_New)->setEnabled(true);
    902913}
    903914
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