mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-28 19:57:05 -06:00
Commands: a boolean or number given as text is refused
Squashed from #3428 onto main.
This commit is contained in:
@@ -619,6 +619,7 @@ fn set_range_style(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
},
|
||||
};
|
||||
let mut change = CharChange::parse(p, C, &s.doc()?.doc.setup)?;
|
||||
super::paint::check_keep_model(p, C)?;
|
||||
change.store_colors(s, p);
|
||||
if change.is_empty() {
|
||||
return Err(bad(C, "nothing to change"));
|
||||
@@ -839,6 +840,7 @@ fn create_in_path(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
if !on_path && !path.is_closed() && path.bounds().is_none_or(|b| b.width() < 1.0 || b.height() < 1.0) {
|
||||
return Err(bad(C, "area type needs a path that encloses an area"));
|
||||
}
|
||||
super::paint::check_keep_model(p, C)?;
|
||||
let style = super::create::new_type_style(s, p);
|
||||
let text = str_param(p, "text").unwrap_or("").to_string();
|
||||
let start = match point_param(p, "at") {
|
||||
|
||||
Reference in New Issue
Block a user