Commit 61d37f1a authored by twanvl's avatar twanvl

remove last_change from MultipleChoiceValue. It is now stored in the action,...

remove last_change from MultipleChoiceValue. It is now stored in the action, which makes more sense.
parent 9857a30b
......@@ -52,10 +52,6 @@ inline void swap_value(ImageValue& a, ImageValue ::ValueType& b
inline void swap_value(SymbolValue& a, SymbolValue ::ValueType& b) { swap(a.filename, b); a.last_update.update(); }
inline void swap_value(TextValue& a, TextValue ::ValueType& b) { swap(a.value, b); a.last_update.update(); }
inline void swap_value(PackageChoiceValue& a, PackageChoiceValue ::ValueType& b) { swap(a.package_name, b); }
inline void swap_value(MultipleChoiceValue& a, MultipleChoiceValue::ValueType& b) {
swap(a.value, b.value);
swap(a.last_change, b.last_change);
}
/// A ValueAction that swaps between old and new values
template <typename T, bool ALLOW_MERGE>
......
......@@ -57,7 +57,6 @@ bool MultipleChoiceValue::update(Context& ctx, const Action* act) {
if (const MultipleChoiceValueAction* mvca = dynamic_cast<const MultipleChoiceValueAction*>(act)) {
ctx.setVariable(_("last_change"), to_script(mvca->changed_choice));
}
// ctx.setVariable(_("last_change"), to_script(last_change));
ChoiceValue::update(ctx,act);
normalForm();
return value() != old_value;
......
......@@ -54,14 +54,6 @@ class MultipleChoiceValue : public ChoiceValue {
DECLARE_HAS_FIELD(MultipleChoice);
virtual ValueP clone() const;
String last_change; ///< Which of the choices was selected/deselected last?
// for SimpleValueAction
struct ValueType {
ChoiceValue::ValueType value;
String last_change;
};
/// Splits the value, stores the selected choices in the out parameter
void get(vector<String>& out) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment