overridableVar: fix reassignment

we don't want to remove already set props with our reassignmemnt
This commit is contained in:
Vaxry 2026-03-26 01:06:10 +00:00
parent 609b0da983
commit 91d87ec875
Signed by: vaxry
GPG key ID: 665806380871D640

View file

@ -62,7 +62,7 @@ namespace Desktop::Types {
for (size_t i = 0; i < PRIORITY_END; ++i) {
if constexpr (Extended && !std::is_same_v<T, bool>)
m_values[i] = other.m_values[i].has_value() ? clampOptional(*other.m_values[i], m_minValue, m_maxValue) : other.m_values[i];
else
else if (other.m_values[i].has_value())
m_values[i] = other.m_values[i];
}