VirtualBox

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


Ignore:
Timestamp:
Nov 2, 2018 3:02:29 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Tools pane: On setCurrentItem we should update last item in any case, not just when actual class of items is chosen.

File:
1 edited

Legend:

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

    r75209 r75228  
    202202        /* Set this item to current if navigation list contains it: */
    203203        if (navigationList().contains(pItem))
     204            m_pCurrentItem = pItem;
     205        /* Update last item in any case: */
     206        switch (pItem->itemClass())
    204207        {
    205             m_pCurrentItem = pItem;
    206             switch (m_pCurrentItem->itemClass())
    207             {
    208                 case UIToolClass_Global:  m_pLastItemGlobal  = m_pCurrentItem; break;
    209                 case UIToolClass_Machine: m_pLastItemMachine = m_pCurrentItem; break;
    210                 default: break;
    211             }
     208            case UIToolClass_Global:  m_pLastItemGlobal  = pItem; break;
     209            case UIToolClass_Machine: m_pLastItemMachine = pItem; break;
     210            default: break;
    212211        }
    213         /* Otherwise it's error: */
    214         else
    215             AssertMsgFailed(("Passed item is not in navigation list!"));
    216212    }
    217213    /* Otherwise reset current item: */
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