fix(color): set current model after label update (#2476)

* fix(color): set current model after label update

Fixes #2460

Here Companion only outputs a more or less empty labels file, so that models are scanned on startup, however not setting the current model properly in this particular case.

* fix(color): bitmap name in modelslist should be zero terminated
This commit is contained in:
Raphael Coeffic
2022-10-06 16:10:48 +10:00
committed by GitHub
parent 974c7e39ad
commit d6741450f3
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -1144,6 +1144,8 @@ bool ModelsList::loadYaml()
modelslist.push_back(model);
filehash.celladded = true;
model->_isDirty = true;
if(filehash.curmodel == true)
modelslist.setCurrentModel(model);
}
}
+1 -1
View File
@@ -77,7 +77,7 @@ class ModelCell
char modelName[LEN_MODEL_NAME + 1] = "";
char modelFinfoHash[FILE_HASH_LENGTH + 1] = "";
#if LEN_BITMAP_NAME > 0
char modelBitmap[LEN_BITMAP_NAME] = "";
char modelBitmap[LEN_BITMAP_NAME + 1] = "";
#endif
gtime_t lastOpened = 0;
bool _isDirty = true;