VirtualBox

Ignore:
Timestamp:
Nov 5, 2009 11:57:29 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: Storage Settings UI: Update to unique medium selection mechanism, taking into account snapshot's diff-disks (excluding for "don't show diffs" mode) and other VMs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp

    r24419 r24420  
    484484             if (medium.isNull() || medium.medium().GetDeviceType() == deviceType)
    485485             {
    486                  /* In 'don't show diffs' mode we should filter out all the mediums
    487                   * which are already attached to some snapshot of current VM. */
     486                 /* In 'don't show diffs' mode we should only show hard-disks which are:
     487                  * 1. Attached to 'current state' of this VM even if these are differencing disks.
     488                  * 2. Not attached to this VM at all only if they are not differencing disks. */
    488489                 if (!aShowDiffs && medium.type() == VBoxDefs::MediumType_HardDisk)
    489490                 {
    490                      if (!medium.medium().GetMachineIds().contains (parent()->machineId()) ||
    491                          medium.isAttachedInCurStateTo (parent()->machineId()))
     491                     if (medium.isAttachedInCurStateTo (parent()->machineId()) ||
     492                         (!medium.medium().GetMachineIds().contains (parent()->machineId()) && !medium.parent()))
    492493                         allMediums << medium.id();
    493494                 }
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