commit 747473d1
Remove issue that did not pick the correct text for button after a label change
Changed files
| M | source/code/MenuSystem.cpp before |
diff --git a/source/code/MenuSystem.cpp b/source/code/MenuSystem.cpp
index c9004a9..722d811 100644
--- a/source/code/MenuSystem.cpp
+++ b/source/code/MenuSystem.cpp
@@ -46,9 +46,11 @@ sago::SagoTextField* ButtonGfx::getLabel(const std::string& text, bool marked) c
return labels[text].get();
}
}
- const auto& theLabel = labels_marked.find(text);
- if (theLabel != labels_marked.end()) {
- return labels_marked[text].get();
+ else {
+ const auto& theLabel = labels_marked.find(text);
+ if (theLabel != labels_marked.end()) {
+ return labels_marked[text].get();
+ }
}
std::shared_ptr<sago::SagoTextField> newField = std::make_shared<sago::SagoTextField>();
newField->SetHolder(&globalData.spriteHolder->GetDataHolder());