layoutName is now layoutId

This commit is contained in:
Raphael Coeffic
2021-04-09 14:56:50 +02:00
parent 2124158686
commit 188a9bcb77
8 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ void loadDefaultLayout()
auto& screenData = g_model.screenData[0];
if (screen == nullptr && defaultLayout != nullptr) {
strcpy(screenData.layoutName, defaultLayout->getId());
strcpy(screenData.LayoutId, defaultLayout->getId());
screen = defaultLayout->create(&screenData.layoutData);
if (screen) {
screen->attach(ViewMain::instance());
@@ -88,7 +88,7 @@ void loadCustomScreens()
for (unsigned int i = 0; i < MAX_CUSTOM_SCREENS; i++) {
auto& screen = customScreens[i];
screen = loadLayout(g_model.screenData[i].layoutName,
screen = loadLayout(g_model.screenData[i].LayoutId,
&g_model.screenData[i].layoutData);
if (screen) {
+2 -2
View File
@@ -69,7 +69,7 @@ void ScreenAddPage::build(FormWindow * window)
const LayoutFactory * factory = getRegisteredLayouts().front();
screen = factory->create(&screenData.layoutData);
strncpy(screenData.layoutName, factory->getId(), sizeof(screenData.layoutName));
strncpy(screenData.LayoutId, factory->getId(), sizeof(screenData.LayoutId));
auto tab = new ScreenSetupPage(menu, screen, screenData);
std::string title(STR_MAIN_VIEW_X);
@@ -301,7 +301,7 @@ void ScreenSetupPage::build(FormWindow * window)
layoutChoice = new LayoutChoice(window, layoutSlot, GET_VALUE(screen->getFactory()), [=](const LayoutFactory *factory) {
delete screen;
screen = factory->create(&screenData.layoutData);
strncpy(screenData.layoutName, factory->getId(), sizeof(CustomScreenData::layoutName));
strncpy(screenData.LayoutId, factory->getId(), sizeof(CustomScreenData::LayoutId));
SET_DIRTY();
updateLayoutOptions();
});