VirtualBox

Changeset 77654 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 11, 2019 2:40:11 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager UI: Chooser pane: Properly update parent item's geometry when it's child being deleted; for that, child have to be removed from the layout prematurely not from internal list only.

File:
1 edited

Legend:

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

    r77638 r77654  
    434434            AssertMsg(m_globalItems.contains(pItem), ("Global-item was not found!"));
    435435            m_globalItems.removeAt(m_globalItems.indexOf(pItem));
     436            if (pItem->isFavorite())
     437                m_pLayoutFavorite->removeItem(pItem);
     438            else
     439                m_pLayoutGlobal->removeItem(pItem);
    436440            break;
    437441        }
     
    440444            AssertMsg(m_groupItems.contains(pItem), ("Group-item was not found!"));
    441445            m_groupItems.removeAt(m_groupItems.indexOf(pItem));
     446            if (pItem->isFavorite())
     447                m_pLayoutFavorite->removeItem(pItem);
     448            else
     449                m_pLayoutGroup->removeItem(pItem);
    442450            break;
    443451        }
     
    446454            AssertMsg(m_machineItems.contains(pItem), ("Machine-item was not found!"));
    447455            m_machineItems.removeAt(m_machineItems.indexOf(pItem));
     456            if (pItem->isFavorite())
     457                m_pLayoutFavorite->removeItem(pItem);
     458            else
     459                m_pLayoutMachine->removeItem(pItem);
    448460            break;
    449461        }
     
    537549void UIChooserItemGroup::updateGeometry()
    538550{
    539     /* Call to base-class: */
    540     UIChooserItem::updateGeometry();
    541 
    542551    /* Update/activate children layout: */
    543552    m_pLayout->updateGeometry();
    544553    m_pLayout->activate();
     554
     555    /* Call to base-class: */
     556    UIChooserItem::updateGeometry();
    545557}
    546558
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