VirtualBox

Changeset 102722 in vbox


Ignore:
Timestamp:
Dec 28, 2023 1:03:41 PM (11 months ago)
Author:
vboxsync
Message:

FE/Qt: UIVirtualBoxManager: A bit of cleanup for Open Global/Machine Tool stuff; Make sure corresponding manager window is closed for the case if global/machine tool being opened embedded way.

File:
1 edited

Legend:

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

    r102721 r102722  
    22072207void UIVirtualBoxManager::sltPerformShowGlobalTool(QAction *pAction)
    22082208{
     2209    /* Sanity checks: */
    22092210    AssertPtrReturnVoid(pAction);
    22102211    AssertPtrReturnVoid(m_pWidget);
     2212
     2213    /* Acquire tool type: */
     2214    const UIToolType enmType = pAction->property("UIToolType").value<UIToolType>();
     2215    AssertReturnVoid(enmType != UIToolType_Invalid);
     2216
     2217    /* Make sure global item is selected: */
    22112218    m_pWidget->switchToGlobalItem();
    2212     m_pWidget->setToolsTypeGlobal(pAction->property("UIToolType").value<UIToolType>());
     2219
     2220    /* Make sure corresponding manager window is closed (if any): */
     2221    sltCloseManagerWindow(enmType);
     2222
     2223    /* Open the tool finally: */
     2224    m_pWidget->setToolsTypeGlobal(enmType);
    22132225}
    22142226
    22152227void UIVirtualBoxManager::sltPerformShowMachineTool(QAction *pAction)
    22162228{
     2229    /* Sanity checks: */
    22172230    AssertPtrReturnVoid(pAction);
    22182231    AssertPtrReturnVoid(m_pWidget);
    2219     m_pWidget->setToolsTypeMachine(pAction->property("UIToolType").value<UIToolType>());
     2232
     2233    /* Acquire tool type: */
     2234    const UIToolType enmType = pAction->property("UIToolType").value<UIToolType>();
     2235    AssertReturnVoid(enmType != UIToolType_Invalid);
     2236
     2237    /* Make sure corresponding manager window is closed (if any): */
     2238    sltCloseManagerWindow(enmType);
     2239
     2240    /* Open the tool finally: */
     2241    m_pWidget->setToolsTypeMachine(enmType);
    22202242}
    22212243
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