Changeset 90272 in vbox
- Timestamp:
- Jul 21, 2021 10:19:55 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145811
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
r90263 r90272 380 380 void UIMediumSizeAndPathGroupBox::setMediumPath(const QString &strMediumPath) 381 381 { 382 if (m_pLocationEditor) 383 m_pLocationEditor->setText(strMediumPath); 382 if (!m_pLocationEditor) 383 return; 384 m_pLocationEditor->blockSignals(true); 385 m_pLocationEditor->setText(strMediumPath); 386 m_pLocationEditor->blockSignals(false); 384 387 } 385 388 … … 398 401 arg(stripFormatExtension(fileInfo.fileName(), formatExtensions)). 399 402 arg(strDefaultExtension)); 400 m_pLocationEditor->setText(newFileInfo.absoluteFilePath());403 setMediumPath(newFileInfo.absoluteFilePath()); 401 404 } 402 405 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r90263 r90272 126 126 UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName); 127 127 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard())); 128 if (!m_userModifiedParameters.contains("MediumPath")) 128 if (!m_userModifiedParameters.contains("MediumPath") && m_pSizeAndLocationGroup) 129 { 129 130 updateVirtualMediumPathFromMachinePathName(); 131 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath()); 132 } 130 133 if (!m_userModifiedParameters.contains("HostnameDomainName")) 131 134 updateHostnameDomainNameFromMachineName(); … … 137 140 Q_UNUSED(strNewPath); 138 141 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard())); 139 if (!m_userModifiedParameters.contains("MediumPath")) 142 if (!m_userModifiedParameters.contains("MediumPath") && m_pSizeAndLocationGroup) 143 { 140 144 updateVirtualMediumPathFromMachinePathName(); 145 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath()); 146 } 141 147 } 142 148 … … 375 381 void UIWizardNewVMPageExpert::initializePage() 376 382 { 383 /* We need not to check existence of parameter within m_userModifiedParameters since initializePage() runs 384 once the page loads before user has a chance to modify parameters explicitly: */ 377 385 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 378 386 AssertReturnVoid(pWizard); … … 390 398 if (m_pFormatButtonGroup) 391 399 newVMWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat()); 392 if (!m_userModifiedParameters.contains("MediumPath")) 393 updateVirtualMediumPathFromMachinePathName(); 400 /* First set value for medium path in widget the wizard: */ 401 updateVirtualMediumPathFromMachinePathName(); 402 newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath()); 394 403 } 395 404 … … 398 407 { 399 408 m_pUserNamePasswordGroupBox->blockSignals(true); 400 if (!m_userModifiedParameters.contains("UserName")) 401 m_pUserNamePasswordGroupBox->setUserName(pWizard->userName()); 402 if (!m_userModifiedParameters.contains("Password")) 403 m_pUserNamePasswordGroupBox->setPassword(pWizard->password()); 409 m_pUserNamePasswordGroupBox->setUserName(pWizard->userName()); 410 m_pUserNamePasswordGroupBox->setPassword(pWizard->password()); 404 411 m_pUserNamePasswordGroupBox->blockSignals(false); 405 412 } 406 if (!m_userModifiedParameters.contains("HostnameDomainName")) 407 updateHostnameDomainNameFromMachineName(); 408 409 if (m_pGAInstallationISOContainer && !m_userModifiedParameters.contains("InstallGuestAdditions")) 413 updateHostnameDomainNameFromMachineName(); 414 415 if (m_pGAInstallationISOContainer) 410 416 { 411 417 m_pGAInstallationISOContainer->blockSignals(true);
Note:
See TracChangeset
for help on using the changeset viewer.