VirtualBox

Changeset 77756 in vbox for trunk


Ignore:
Timestamp:
Mar 18, 2019 12:47:30 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129417
Message:

FE/Qt: bugref:9241: VirtualBox Manager: Chooser pane: Adding more clarity for UIChooserItem::makeSureItemIsVisible API.

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

Legend:

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

    r77723 r77756  
    476476            pParentItem->open(false);
    477477    }
    478     /* Make sure we scroll to the item's rectangle: */
    479     pParentItem->makeSureItemIsVisible(this);
    480478}
    481479
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.h

    r77701 r77756  
    200200        /** Makes sure item is visible. */
    201201        virtual void makeSureItsVisible();
    202         /** Makes sure passed child @a pItem is visible. */
     202        /** Makes sure passed @a pItem is visible within the current root item.
     203          * @note Please keep in mind that any group item can be a root, but there
     204          * is just one model root item at the same time, accessible via model's
     205          * root() getter, and this API can be called for current root item only,
     206          * because this is root item who performs actual scrolling, while
     207          * @a pItem itself can be on any level of embedding. */
    203208        virtual void makeSureItemIsVisible(UIChooserItem *pItem) { Q_UNUSED(pItem); }
    204209
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp

    r77723 r77756  
    259259
    260260    /* Make sure item visible: */
    261     AssertPtrReturnVoid(parentItem());
    262     parentItem()->toGroupItem()->makeSureItemIsVisible(this);
     261    if (model()->root())
     262        model()->root()->makeSureItemIsVisible(this);
    263263
    264264    /* Assign name-editor text: */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette