VirtualBox

Ignore:
Timestamp:
Oct 25, 2018 3:47:25 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Make sure both last chosen tools (global and machine one) opened at startup, not just of current class.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
5 edited

Legend:

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

    r75054 r75081  
    585585    }
    586586
    587     /* Open tool currently chosen in Tools-pane:  */
    588     sltHandleToolsPaneIndexChange();
     587    /* Open tools last chosen in Tools-pane: */
     588    switchToGlobalTool(m_pPaneTools->lastSelectedToolGlobal());
     589    switchToMachineTool(m_pPaneTools->lastSelectedToolMachine());
    589590}
    590591
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp

    r75016 r75081  
    7373{
    7474    return m_pToolsModel->toolsType();
     75}
     76
     77UIToolType UITools::lastSelectedToolGlobal() const
     78{
     79    return m_pToolsModel->lastSelectedToolGlobal();
     80}
     81
     82UIToolType UITools::lastSelectedToolMachine() const
     83{
     84    return m_pToolsModel->lastSelectedToolMachine();
    7585}
    7686
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.h

    r75016 r75081  
    8181        UIToolType toolsType() const;
    8282
     83        /** Returns last selected global tool. */
     84        UIToolType lastSelectedToolGlobal() const;
     85        /** Returns last selected machine tool. */
     86        UIToolType lastSelectedToolMachine() const;
     87
    8388        /** Defines whether certain @a enmClass of tools is @a fEnabled.*/
    8489        void setToolsEnabled(UIToolClass enmClass, bool fEnabled);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r75070 r75081  
    155155}
    156156
     157UIToolType UIToolsModel::lastSelectedToolGlobal() const
     158{
     159    return m_pLastItemGlobal->itemType();
     160}
     161
     162UIToolType UIToolsModel::lastSelectedToolMachine() const
     163{
     164    return m_pLastItemMachine->itemType();
     165}
     166
    157167void UIToolsModel::setToolsEnabled(UIToolClass enmClass, bool fEnabled)
    158168{
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h

    r75017 r75081  
    106106        /** Returns current tools type. */
    107107        UIToolType toolsType() const;
     108
     109        /** Returns last selected global tool. */
     110        UIToolType lastSelectedToolGlobal() const;
     111        /** Returns last selected machine tool. */
     112        UIToolType lastSelectedToolMachine() const;
    108113
    109114        /** Defines whether certain @a enmClass of tools is @a fEnabled.*/
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