VirtualBox

Changeset 42630 in vbox for trunk


Ignore:
Timestamp:
Aug 6, 2012 4:32:10 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 6234: Support for VM groups: Make sure group is opened when new machine is created in there.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
Files:
3 edited

Legend:

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

    r42593 r42630  
    155155}
    156156
    157 void UIGChooserItemGroup::close()
     157void UIGChooserItemGroup::close(bool fAnimated /* = true */)
    158158{
    159159    AssertMsg(parentItem(), ("Can't close root-item!"));
    160     m_pButton->setToggled(false);
    161 }
    162 
    163 void UIGChooserItemGroup::open()
     160    m_pButton->setToggled(false ,fAnimated);
     161}
     162
     163void UIGChooserItemGroup::open(bool fAnimated /* = true */)
    164164{
    165165    AssertMsg(parentItem(), ("Can't open root-item!"));
    166     m_pButton->setToggled(true);
     166    m_pButton->setToggled(true, fAnimated);
    167167}
    168168
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h

    r42593 r42630  
    5858    bool closed() const;
    5959    bool opened() const;
    60     void close();
    61     void open();
     60    void close(bool fAnimated = true);
     61    void open(bool fAnimated = true);
    6262
    6363    /* API: Children stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r42629 r42630  
    10961096        /* Trying to get group item among our children: */
    10971097        foreach (UIGChooserItem *pGroupItem, pParentItem->items(UIGChooserItemType_Group))
     1098        {
    10981099            if (pGroupItem->name() == strSecondSubName)
    1099                 return getGroupItem(strFirstSuffix, pGroupItem, fAllGroupsOpened);
     1100            {
     1101                UIGChooserItem *pFoundItem = getGroupItem(strFirstSuffix, pGroupItem, fAllGroupsOpened);
     1102                if (UIGChooserItemGroup *pFoundGroupItem = pFoundItem->toGroupItem())
     1103                    if (fAllGroupsOpened && pFoundGroupItem->closed())
     1104                        pFoundGroupItem->open(false);
     1105                return pFoundItem;
     1106            }
     1107        }
    11001108    }
    11011109
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