diff options
Diffstat (limited to 'wx+/choice_enum.h')
-rwxr-xr-x | wx+/choice_enum.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wx+/choice_enum.h b/wx+/choice_enum.h index 2c424b9f..f2c93927 100755 --- a/wx+/choice_enum.h +++ b/wx+/choice_enum.h @@ -103,11 +103,11 @@ Enum getEnumVal(const EnumDescrList<Enum>& mapping, const wxChoice& ctrl) template <class Enum> void updateTooltipEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl) { - const Enum value = getEnumVal(mapping, ctrl); + const Enum currentValue = getEnumVal(mapping, ctrl); - for (const auto& item : mapping.descrList) - if (item.first == value) - ctrl.SetToolTip(item.second.second); + for (const auto& [enumValue, textAndTooltip] : mapping.descrList) + if (currentValue == enumValue) + ctrl.SetToolTip(textAndTooltip.second); } } |