mirror of https://github.com/PCSX2/pcsx2.git
DEV9: Consider placeholderText when opening File dialog
Per-game settings store the global setting as placeholderText. If no per-game setting is present we can prefill the dialog with the global setting, before falling back to a default value
This commit is contained in:
parent
8d3325e6cd
commit
5869d35d85
|
@ -703,8 +703,8 @@ void DEV9SettingsWidget::onHddBrowseFileClicked()
|
|||
{
|
||||
QString path =
|
||||
QDir::toNativeSeparators(QFileDialog::getSaveFileName(QtUtils::GetRootWidget(this), tr("HDD Image File"),
|
||||
!m_ui.hddFile->text().isEmpty() ? m_ui.hddFile->text() : "DEV9hdd.raw", tr("HDD (*.raw)"), nullptr,
|
||||
QFileDialog::DontConfirmOverwrite));
|
||||
!m_ui.hddFile->text().isEmpty() ? m_ui.hddFile->text() : (!m_ui.hddFile->placeholderText().isEmpty() ? m_ui.hddFile->placeholderText() : "DEV9hdd.raw"),
|
||||
tr("HDD (*.raw)"), nullptr, QFileDialog::DontConfirmOverwrite));
|
||||
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue