mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-30 13:46:47 -06: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:
@@ -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