Remove obsolete objid property

This commit is contained in:
fvanroie 2023-04-13 00:17:54 +02:00
parent b74066253c
commit 6f4bde6556
2 changed files with 8 additions and 7 deletions

View File

@ -13,6 +13,7 @@
- Set default `line_width` of new `line` objects to 1
- Allow line and block comments in pages.jsonl
- Removed deprecated `txt` property, use `text` instead
- Removed deprecated `objid` property, use `obj` instead
- HASP theme: Toggle objects now use the secondary color when they are in the toggled state.
### Fonts

View File

@ -270,19 +270,19 @@ void hasp_new_object(const JsonObject& config, uint8_t& saved_page_id)
/* Create the object first */
/* Validate type */
if(config[FPSTR(FP_OBJID)].isNull()) { // TODO: obsolete objid
// if(config[FPSTR(FP_OBJID)].isNull()) { // TODO: obsolete objid
if(config[FPSTR(FP_OBJ)].isNull()) {
return; // comments
} else {
sdbm = Parser::get_sdbm(config[FPSTR(FP_OBJ)].as<const char*>());
config.remove(FPSTR(FP_OBJ));
}
} else {
LOG_WARNING(TAG_HASP, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), "objid",
"obj"); // TODO: obsolete objid
sdbm = config[FPSTR(FP_OBJID)].as<uint8_t>();
config.remove(FPSTR(FP_OBJID));
}
// } else {
// LOG_WARNING(TAG_HASP, F(D_ATTRIBUTE_OBSOLETE D_ATTRIBUTE_INSTEAD), "objid",
// "obj"); // TODO: obsolete objid
// sdbm = config[FPSTR(FP_OBJID)].as<uint8_t>();
// config.remove(FPSTR(FP_OBJID));
// }
switch(sdbm) {
/* ----- Custom Objects ------ */