layoutName is now layoutId
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user