fix (color): Inability to select labels after editing them (#2308)

* (fw) Instantly update model bitmap

* (fw) Delete menu first, then call update
This commit is contained in:
Cliff
2022-09-16 13:13:28 +10:00
committed by GitHub
parent 9fbf0b7b0a
commit c903e5bc97
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -335,10 +335,10 @@ class MyMenu : public Menu
void deleteLater(bool detach = true, bool trash = true) override
{
Menu::deleteLater(detach, trash);
if (_finishHandler != nullptr) {
_finishHandler();
}
Menu::deleteLater(detach, trash);
}
protected:
+7
View File
@@ -70,6 +70,13 @@ static void setModelBitmap(std::string newValue)
{
strncpy(g_model.header.bitmap, newValue.c_str(),
sizeof(g_model.header.bitmap));
g_model.header.bitmap[sizeof(g_model.header.bitmap)-1] = '\0';
auto model = modelslist.getCurrentModel();
if (model) {
strncpy(model->modelBitmap, newValue.c_str(),
sizeof(ModelCell::modelBitmap));
model->modelBitmap[sizeof(ModelCell::modelBitmap)-1] = '\0';
}
SET_DIRTY();
}