VirtualBox

Changeset 4008 in vbox for trunk


Ignore:
Timestamp:
Aug 2, 2007 3:22:47 PM (17 years ago)
Author:
vboxsync
Message:

FE/Qt: Make sure the snapshot tree item becomes visible when selected (defect 2150).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSnapshotsWgt.ui.h

    r4005 r4008  
    445445void VBoxSnapshotsWgt::populateSnapshots (const CSnapshot &snapshot, QListViewItem *item)
    446446{
    447 
    448447    ListViewItem *si = 0;
    449448    if (item)
     
    474473    if (item)
    475474    {
     475        QPoint oldPos (listView->contentsX(), listView->contentsY());
    476476        listView->ensureItemVisible (item);
    477         listView->setContentsPos (item->height() * item->depth(),
     477        listView->setContentsPos (listView->treeStepSize() * item->depth(),
    478478                                  listView->contentsY());
     479        /* Sometimes (here, when both X and Y are changed), affected items
     480         * are not properly updated after moving the contents. Fix it. */
     481        if (oldPos != QPoint (listView->contentsX(), listView->contentsY()))
     482            listView->triggerUpdate();
    479483    }
    480484
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