G-code substitutions: Added path to helper

Fixed a bugs:
* Notes wasn't correctly save to 3mf
* Button "Delete All" wasn't hidden when last substitution was deleted
This commit is contained in:
YuSanka 2022-01-28 17:11:27 +01:00
parent cfdf7d2a00
commit 07a27c9e2d
2 changed files with 17 additions and 4 deletions

View file

@ -54,6 +54,7 @@ class SubstitutionManager
int m_em{10};
std::function<void()> m_cb_edited_substitution{ nullptr };
std::function<void()> m_cb_hide_delete_all_btn{ nullptr };
void validate_lenth();
bool is_compatibile_with_ui();
@ -83,6 +84,13 @@ public:
if (m_cb_edited_substitution)
m_cb_edited_substitution();
}
void set_cb_hide_delete_all_btn(std::function<void()> cb_hide_delete_all_btn) {
m_cb_hide_delete_all_btn = cb_hide_delete_all_btn;
}
void hide_delete_all_btn() {
if (m_cb_hide_delete_all_btn)
m_cb_hide_delete_all_btn();
}
bool is_empty_substitutions();
};