Eliminated some unnecessary helpsystem updates

This commit is contained in:
Leon Styhre 2025-02-04 18:03:19 +01:00
parent 9c76882530
commit 5cb8b1e7e3

View file

@ -855,6 +855,12 @@ void Window::setHelpPrompts(const std::vector<HelpPrompt>& prompts)
if (mHelpComponents != nullptr) { if (mHelpComponents != nullptr) {
for (auto& helpComponent : *mHelpComponents) { for (auto& helpComponent : *mHelpComponents) {
if (mGuiStack.size() == 1 &&
helpComponent->getHelpComponentScope() == HelpComponentScope::MENU)
continue;
else if (mGuiStack.size() > 1 &&
helpComponent->getHelpComponentScope() == HelpComponentScope::VIEW)
continue;
helpComponent->clearPrompts(); helpComponent->clearPrompts();
helpComponent->setPrompts(addPrompts); helpComponent->setPrompts(addPrompts);
} }