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:
@@ -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:
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user