Skip to content

Fix emulator checkboxes being visible if a valid ISO is selected but you have selected the PC version#1239

Merged
shananas merged 1 commit intoOpenKH:masterfrom
shananas:master
Dec 20, 2025
Merged

Fix emulator checkboxes being visible if a valid ISO is selected but you have selected the PC version#1239
shananas merged 1 commit intoOpenKH:masterfrom
shananas:master

Conversation

@shananas
Copy link
Copy Markdown
Collaborator

@shananas shananas commented Dec 19, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the setup wizard to conditionally display emulator configuration option checks instead of always showing them.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 19, 2025

Walkthrough

A visibility binding Pcsx2ConfigVisibility was added to a horizontal StackPanel in SetupWizardWindow.xaml containing KH1-4GB, KH2-4GB, and ReCoM-5GB checkboxes, replacing the previously always-visible panel while retaining individual checkbox visibility bindings.

Changes

Cohort / File(s) Summary
PCSX2 Configuration UI Visibility
OpenKh.Tools.ModsManager/Views/SetupWizardWindow.xaml
Added Pcsx2ConfigVisibility binding to the horizontal StackPanel containing KH1-4GB, KH2-4GB, and ReCoM-5GB checks; panel now conditionally visible based on ViewModel property instead of always visible.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • Delta-473

Poem

🐰 A wizard's panel once stood proud and bright,
Now hides behind conditions out of sight.
With PCSX2's binding, it shows with grace,
Visibility finds its proper place! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main fix: preventing emulator checkboxes from appearing when a valid ISO is selected but the user chose the PC version.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between efd9217 and 55762f6.

📒 Files selected for processing (1)
  • OpenKh.Tools.ModsManager/Views/SetupWizardWindow.xaml (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: shananas
Repo: OpenKH/OpenKh PR: 1226
File: OpenKh.Tools.ModsManager/ViewModels/SetupWizardViewModel.cs:0-0
Timestamp: 2025-11-21T23:23:49.389Z
Learning: In OpenKh.Tools.ModsManager/ViewModels/SetupWizardViewModel.cs, the PageRegion wizard page is specific to KH2 PS2 ISO only. The WizardPageAfterGameData should only be set to PageRegion when IsoLocationKH2 is not null, and should skip this page for KH1 and Recom ISOs.
📚 Learning: 2025-11-21T23:23:49.389Z
Learnt from: shananas
Repo: OpenKH/OpenKh PR: 1226
File: OpenKh.Tools.ModsManager/ViewModels/SetupWizardViewModel.cs:0-0
Timestamp: 2025-11-21T23:23:49.389Z
Learning: In OpenKh.Tools.ModsManager/ViewModels/SetupWizardViewModel.cs, the PageRegion wizard page is specific to KH2 PS2 ISO only. The WizardPageAfterGameData should only be set to PageRegion when IsoLocationKH2 is not null, and should skip this page for KH1 and Recom ISOs.

Applied to files:

  • OpenKh.Tools.ModsManager/Views/SetupWizardWindow.xaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (csharp)
  • GitHub Check: build
🔇 Additional comments (1)
OpenKh.Tools.ModsManager/Views/SetupWizardWindow.xaml (1)

235-239: LGTM! Proper visibility control for PCSX2 extraction options.

The addition of Pcsx2ConfigVisibility to the parent StackPanel correctly scopes the PS2 ISO extraction checkboxes to only appear when PCSX2 is the selected game edition. This fixes the issue where these checkboxes could appear when the PC version was selected if valid ISOs were present, since the individual checkbox visibility bindings (KH1RecognizedVisibility, etc.) would still evaluate to true.

The two-level visibility control (parent panel + individual checkboxes) ensures these options only display when both conditions are met:

  1. PCSX2 is selected as the game edition (parent StackPanel)
  2. The specific ISO is recognized (individual checkboxes)

This follows the existing pattern used throughout the file for PCSX2-specific UI elements.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shananas shananas merged commit 3d3d6f2 into OpenKH:master Dec 20, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants