Changeset 565 in vbox for trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
- Timestamp:
- Feb 2, 2007 5:07:33 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
r563 r565 1269 1269 } 1270 1270 1271 /* select first child */1272 setCurrentItem (hdsView, hdsView->firstChild());1273 setCurrentItem (cdsView, cdsView->firstChild());1274 setCurrentItem (fdsView, fdsView->firstChild());1275 1276 1271 /* emulate the finished signal to reuse the code */ 1277 1272 if (!vboxGlobal().isMediaEnumerationStarted()) 1278 1273 mediaEnumFinished (list); 1279 1274 } 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()); 1280 1280 } 1281 1281 … … 1289 1289 for (it = list.begin(); it != list.end(); ++ it) 1290 1290 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()) 1293 1295 setCurrentItem (hdsView, hdsView->firstChild()); 1294 if (!cdsView->currentItem() )1296 if (!cdsView->currentItem() || !cdSelectedId.isNull()) 1295 1297 setCurrentItem (cdsView, cdsView->firstChild()); 1296 if (!fdsView->currentItem() )1298 if (!fdsView->currentItem() || !fdSelectedId.isNull()) 1297 1299 setCurrentItem (fdsView, fdsView->firstChild()); 1298 1300 … … 1347 1349 item = createHdItem (hdsView, 0, aMedia); 1348 1350 if (item->getUuid() == hdSelectedId) 1351 { 1349 1352 setCurrentItem (hdsView, item); 1353 hdSelectedId = QUuid(); 1354 } 1350 1355 break; 1351 1356 case VBoxDefs::CD: 1352 1357 item = createCdItem (cdsView, 0, aMedia); 1353 1358 if (item->getUuid() == cdSelectedId) 1359 { 1354 1360 setCurrentItem (cdsView, item); 1361 cdSelectedId = QUuid(); 1362 } 1355 1363 break; 1356 1364 case VBoxDefs::FD: 1357 1365 item = createFdItem (fdsView, 0, aMedia); 1358 1366 if (item->getUuid() == fdSelectedId) 1367 { 1359 1368 setCurrentItem (fdsView, item); 1369 fdSelectedId = QUuid(); 1370 } 1360 1371 break; 1361 1372 default: … … 1470 1481 item = hdsView->currentItem(); 1471 1482 di = (item && item->rtti() == 1001) ? static_cast <DiskImageItem *> (item) : 0; 1472 hdSelectedId = di ? di->getUuid() : Q Uuid();1483 hdSelectedId = di ? di->getUuid() : QString::null; 1473 1484 1474 1485 item = cdsView->currentItem(); 1475 1486 di = (item && item->rtti() == 1001) ? static_cast <DiskImageItem *> (item) : 0; 1476 cdSelectedId = di ? di->getUuid() : Q Uuid();1487 cdSelectedId = di ? di->getUuid() : QString::null; 1477 1488 1478 1489 item = fdsView->currentItem(); 1479 1490 di = (item && item->rtti() == 1001) ? static_cast <DiskImageItem *> (item) : 0; 1480 fdSelectedId = di ? di->getUuid() : Q Uuid();1491 fdSelectedId = di ? di->getUuid() : QString::null; 1481 1492 1482 1493 /* finally, clear all lists */
Note:
See TracChangeset
for help on using the changeset viewer.