VirtualBox

Ignore:
Timestamp:
Feb 2, 2007 5:07:33 PM (18 years ago)
Author:
vboxsync
Message:

FE/Qt: Fixed build breakage; fixed a trap during application termination on Win32.

File:
1 edited

Legend:

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

    r563 r565  
    12691269        }
    12701270
    1271         /* select first child */
    1272         setCurrentItem (hdsView, hdsView->firstChild());
    1273         setCurrentItem (cdsView, cdsView->firstChild());
    1274         setCurrentItem (fdsView, fdsView->firstChild());
    1275        
    12761271        /* emulate the finished signal to reuse the code */
    12771272        if (!vboxGlobal().isMediaEnumerationStarted())
    12781273            mediaEnumFinished (list);
    12791274    }
     1275
     1276    /* for a newly opened dialog, select the first item */
     1277    setCurrentItem (hdsView, hdsView->firstChild());
     1278    setCurrentItem (cdsView, cdsView->firstChild());
     1279    setCurrentItem (fdsView, fdsView->firstChild());
    12801280}
    12811281
     
    12891289    for (it = list.begin(); it != list.end(); ++ it)
    12901290        mediaAdded (*it);
    1291     /* select first child */
    1292     if (!hdsView->currentItem())
     1291   
     1292    /* select the first item if the previous saved item is not found
     1293     * or no current item at all */
     1294    if (!hdsView->currentItem() || !hdSelectedId.isNull())
    12931295        setCurrentItem (hdsView, hdsView->firstChild());
    1294     if (!cdsView->currentItem())
     1296    if (!cdsView->currentItem() || !cdSelectedId.isNull())
    12951297        setCurrentItem (cdsView, cdsView->firstChild());
    1296     if (!fdsView->currentItem())
     1298    if (!fdsView->currentItem() || !fdSelectedId.isNull())
    12971299        setCurrentItem (fdsView, fdsView->firstChild());
    12981300
     
    13471349            item = createHdItem (hdsView, 0, aMedia);
    13481350            if (item->getUuid() == hdSelectedId)
     1351            {
    13491352                setCurrentItem (hdsView, item);
     1353                hdSelectedId = QUuid();
     1354            }
    13501355            break;
    13511356        case VBoxDefs::CD:
    13521357            item = createCdItem (cdsView, 0, aMedia);
    13531358            if (item->getUuid() == cdSelectedId)
     1359            {
    13541360                setCurrentItem (cdsView, item);
     1361                cdSelectedId = QUuid();
     1362            }
    13551363            break;
    13561364        case VBoxDefs::FD:
    13571365            item = createFdItem (fdsView, 0, aMedia);
    13581366            if (item->getUuid() == fdSelectedId)
     1367            {
    13591368                setCurrentItem (fdsView, item);
     1369                fdSelectedId = QUuid();
     1370            }
    13601371            break;
    13611372        default:
     
    14701481    item = hdsView->currentItem();
    14711482    di = (item && item->rtti() == 1001) ? static_cast <DiskImageItem *> (item) : 0;
    1472     hdSelectedId = di ? di->getUuid() : QUuid();
     1483    hdSelectedId = di ? di->getUuid() : QString::null;
    14731484 
    14741485    item = cdsView->currentItem();
    14751486    di = (item && item->rtti() == 1001) ? static_cast <DiskImageItem *> (item) : 0;
    1476     cdSelectedId = di ? di->getUuid() : QUuid();
     1487    cdSelectedId = di ? di->getUuid() : QString::null;
    14771488
    14781489    item = fdsView->currentItem();
    14791490    di = (item && item->rtti() == 1001) ? static_cast <DiskImageItem *> (item) : 0;
    1480     fdSelectedId = di ? di->getUuid() : QUuid();
     1491    fdSelectedId = di ? di->getUuid() : QString::null;
    14811492
    14821493    /* finally, clear all lists */
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