mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Enable retrieval of a GncOptionDateValue's relative period.
So that it can be displayed by dialog-option.
This commit is contained in:
parent
dc876d4041
commit
93a3716c00
@ -48,6 +48,11 @@ GncOption::get_value() const
|
||||
return std::visit([](const auto option)->ValueType {
|
||||
if constexpr (std::is_same_v<std::decay_t<decltype(option.get_value())>, std::decay_t<ValueType>>)
|
||||
return option.get_value();
|
||||
if constexpr (std::is_same_v<std::decay_t<decltype(option)>,
|
||||
GncOptionDateValue> &&
|
||||
std::is_same_v<std::decay_t<ValueType>,
|
||||
RelativeDatePeriod>)
|
||||
return option.get_period();
|
||||
return ValueType {};
|
||||
}, *m_option);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user