diff options
| author | JosJuice <josjuice@gmail.com> | 2020-07-04 15:06:05 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-07-04 15:06:05 +0200 |
| commit | 5360ec80c8dc35b65c1a14066fa63499dd9d5b03 (patch) | |
| tree | 00aa33d48d19e740a11d3415e820b15b67a7efe4 /Source/Core/DolphinQt/ConvertDialog.cpp | |
| parent | 38b36536b2ccefd2bd552df040c706775b8396e8 (diff) | |
DolphinQt: Fix scrubbing not being disabled for Datel discs
The code for disabling scrubbing for RVZ was overriding the code
for disabling scrubbing for Datel discs.
Diffstat (limited to 'Source/Core/DolphinQt/ConvertDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/ConvertDialog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/ConvertDialog.cpp b/Source/Core/DolphinQt/ConvertDialog.cpp index 49fc9e8975..24548a9d2d 100644 --- a/Source/Core/DolphinQt/ConvertDialog.cpp +++ b/Source/Core/DolphinQt/ConvertDialog.cpp @@ -83,8 +83,6 @@ ConvertDialog::ConvertDialog(QList<std::shared_ptr<const UICommon::GameFile>> fi m_scrub = new QCheckBox; grid_layout->addWidget(new QLabel(tr("Remove Junk Data (Irreversible):")), 4, 0); grid_layout->addWidget(m_scrub, 4, 1); - m_scrub->setEnabled( - std::none_of(m_files.begin(), m_files.end(), std::mem_fn(&UICommon::GameFile::IsDatelDisc))); QPushButton* convert_button = new QPushButton(tr("Convert")); @@ -267,8 +265,12 @@ void ConvertDialog::OnFormatChanged() m_block_size->setEnabled(m_block_size->count() > 1); m_compression->setEnabled(m_compression->count() > 1); - m_scrub->setEnabled(format != DiscIO::BlobType::RVZ); - if (format == DiscIO::BlobType::RVZ) + const bool scrubbing_allowed = + format != DiscIO::BlobType::RVZ && + std::none_of(m_files.begin(), m_files.end(), std::mem_fn(&UICommon::GameFile::IsDatelDisc)); + + m_scrub->setEnabled(scrubbing_allowed); + if (!scrubbing_allowed) m_scrub->setChecked(false); } |
