mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-03 00:59:10 +00:00
UI: Macro Options saves over the macro it changes
Saving a macro over one with the same name now needs `replace: true`, so Macro Options, which changes the shortcut and description of a macro that exists, failed to save. It passes `replace: true`; `options_set_a_shortcut_that_runs_the_macro` covers it.
This commit is contained in:
1 parent
c442da9221
commit
ea5eb2ae3c
1 file changed
+2
-1
@@ -574,7 +574,8 @@ pub fn save_options(app: &mut SheetApp, name: &str, letter: Option<char>, descri
|
||||
};
|
||||
o.insert("description".into(), json!(description));
|
||||
}
|
||||
match app.run("macro.save", json!({"macro": m})) {
|
||||
// Macro Options changes a macro that exists, so the save replaces it.
|
||||
match app.run("macro.save", json!({"macro": m, "replace": true})) {
|
||||
Ok(_) => true,
|
||||
Err(e) => {
|
||||
app.message = Some(("Macro Options".into(), crate::clean_error(&e)));
|
||||
|
||||
Reference in new issue
Block a user