VirtualBox

Ignore:
Timestamp:
Aug 18, 2017 9:59:34 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
117599
Message:

FE/Qt: bugref:6669: macOS: Make sure Clone 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/UISelectorWindow.cpp

    r68455 r68456  
    674674    AssertMsgReturnVoid(pItem, ("Current item should be selected!\n"));
    675675
    676     /* Show Clone VM wizard: */
    677     UISafePointerWizard pWizard = new UIWizardCloneVM(this, pItem->machine());
     676    /* Lock the action preventing cascade calls: */
     677    actionPool()->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(false);
     678
     679    /* Use the "safe way" to open stack of Mac OS X Sheets: */
     680    QWidget *pWizardParent = windowManager().realParentWindow(this);
     681    UISafePointerWizard pWizard = new UIWizardCloneVM(pWizardParent, pItem->machine());
     682    windowManager().registerNewParent(pWizard, pWizardParent);
    678683    pWizard->prepare();
    679684    pWizard->exec();
    680685    if (pWizard)
    681686        delete pWizard;
     687
     688    /* Unlock the action allowing further calls: */
     689    actionPool()->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(true);
    682690}
    683691
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