After Add in Change Parameters, the new-parameter row's expression goes back to the default a new row starts with. Fixes #1170.
This commit is contained in:
1 parent
2a4907884b
commit
9dc12b4d0f
2 files changed
+17
-1
No files matched your search
@@ -124,3 +124,16 @@ fn parameter_rename_arrow_keys_move_cursor_and_keep_editing() {
|
||||
let result = h.app.session.execute("parameters.list", &json!({})).unwrap();
|
||||
assert!(result["parameters"].as_array().unwrap().iter().any(|p| p["name"] == "plate_width"));
|
||||
}
|
||||
#[test]
|
||||
fn parameter_add_resets_expression_for_next_row() {
|
||||
let mut h = open();
|
||||
let initial = h.app.params.as_ref().unwrap().new_expr.clone();
|
||||
fill(&mut h, "name", "width");
|
||||
fill(&mut h, "expression", "25 mm");
|
||||
enter(&mut h, false);
|
||||
let result = h.app.session.execute("parameters.list", &json!({})).unwrap();
|
||||
assert!(result["parameters"].as_array().unwrap().iter().any(|p| p["name"] == "width" && p["expression"] == "25 mm"));
|
||||
let d = h.app.params.as_ref().unwrap();
|
||||
assert!(d.new_name.is_empty());
|
||||
assert_eq!(d.new_expr, initial);
|
||||
}
|
||||
Reference in new issue
Block a user