mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
Fix search crashing when section child scrolled too far.
This commit is contained in:
parent
40da9997c5
commit
0c69fd9444
1 changed files with 27 additions and 26 deletions
|
@ -185,8 +185,8 @@ bool ModernMenuHeaderEntry(std::string label) {
|
|||
}
|
||||
|
||||
uint32_t Menu::DrawSearchResults(std::string& menuSearchText) {
|
||||
ImGui::BeginChild("Search Results");
|
||||
int searchCount = 0;
|
||||
if (ImGui::BeginChild("Search Results")) {
|
||||
for (auto& menuLabel : menuOrder) {
|
||||
auto& menuEntry = menuEntries.at(menuLabel);
|
||||
for (auto& sidebarLabel : menuEntry.sidebarOrder) {
|
||||
|
@ -217,6 +217,7 @@ uint32_t Menu::DrawSearchResults(std::string& menuSearchText) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return searchCount;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue