VirtualBox

Changeset 88471 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 12, 2021 1:50:49 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: VirtualBox Manager: Add VM functionality: Consult to currently selected machine location while proposing initial folder for new VM being added.

File:
1 edited

Legend:

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

    r88242 r88471  
    25802580    if (strTmpFile.isEmpty())
    25812581    {
    2582         QString strBaseFolder = comVBox.GetSystemProperties().GetDefaultMachineFolder();
     2582        QString strBaseFolder;
     2583        if (currentItem() && currentItem()->toLocal())
     2584        {
     2585            QDir folder = QFileInfo(currentItem()->toLocal()->settingsFile()).absoluteDir();
     2586            folder.cdUp();
     2587            strBaseFolder = folder.absolutePath();
     2588        }
     2589        if (strBaseFolder.isEmpty())
     2590            strBaseFolder = comVBox.GetSystemProperties().GetDefaultMachineFolder();
    25832591        QString strTitle = tr("Select a virtual machine file");
    25842592        QStringList extensions;
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