mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
fix conditional negation being lost on field rename
https://forums.ankiweb.net/t/anki-force-changes-all-to/1694
This commit is contained in:
parent
0787a5d1da
commit
f1a30c243a
1 changed files with 2 additions and 2 deletions
|
@ -689,12 +689,12 @@ fn rename_and_remove_fields(
|
||||||
// remove the field, preserving children
|
// remove the field, preserving children
|
||||||
Some(None) => out.extend(children),
|
Some(None) => out.extend(children),
|
||||||
// rename it
|
// rename it
|
||||||
Some(Some(new_name)) => out.push(ParsedNode::Conditional {
|
Some(Some(new_name)) => out.push(ParsedNode::NegatedConditional {
|
||||||
key: new_name.into(),
|
key: new_name.into(),
|
||||||
children,
|
children,
|
||||||
}),
|
}),
|
||||||
// or leave it alone
|
// or leave it alone
|
||||||
None => out.push(ParsedNode::Conditional { key, children }),
|
None => out.push(ParsedNode::NegatedConditional { key, children }),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue