mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 08:39:28 +01:00
Settings: Fix a blank page when reopening settings on the Search tab
The saved tab was selected before the Search tab was added, so the index was out of range and no tab was created. Select it after adding Search, and create the current tab anyway if the saved one no longer exists (Search is hidden on small screens). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f5059f9948
commit
0c8c447284
2 files changed
+11
-5
No files matched your search
@@ -114,11 +114,6 @@ void UITabbedBaseDialogScreen::CreateViews() {
|
||||
|
||||
// Let the subclass create its tabs.
|
||||
CreateTabs();
|
||||
if (currentTabSetting_) {
|
||||
tabHolder_->SetInitialTab(*currentTabSetting_);
|
||||
} else {
|
||||
tabHolder_->EnsureTab(tabHolder_->GetCurrentTab());
|
||||
}
|
||||
|
||||
tabHolder_->OnChangeTab.Add([this](UI::EventParams &e) {
|
||||
if (currentTabSetting_) {
|
||||
@@ -151,6 +146,13 @@ void UITabbedBaseDialogScreen::CreateViews() {
|
||||
}
|
||||
}
|
||||
|
||||
// After the search tab, which the saved tab can be.
|
||||
if (currentTabSetting_) {
|
||||
tabHolder_->SetInitialTab(*currentTabSetting_);
|
||||
} else {
|
||||
tabHolder_->EnsureTab(tabHolder_->GetCurrentTab());
|
||||
}
|
||||
|
||||
// Need to handle recreates, both important and accidental ones.
|
||||
if (!searchFilter_.empty()) {
|
||||
ApplySearchFilter();
|
||||
|
||||
Reference in new issue
Block a user