standalone LUA: do not really "attach" the window to any parent
It is on a separate screen anyway.
This commit is contained in:
committed by
Raphael Coeffic
parent
0f07f2b690
commit
d9c1af2080
@@ -175,7 +175,7 @@ class SelectTemplate : public TemplatePage
|
||||
// Need to update() the ModelCategoryPageBody before attaching StandaloneLuaWindow to not mess up focus
|
||||
update();
|
||||
update = nullptr;
|
||||
StandaloneLuaWindow::instance()->attach(focusWindow);
|
||||
StandaloneLuaWindow::instance()->attach();
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
@@ -96,7 +96,7 @@ static void run_lua_tool(Window* parent, const std::string& path)
|
||||
|
||||
luaExec(path.c_str());
|
||||
auto lua_win = StandaloneLuaWindow::instance();
|
||||
lua_win->attach(parent);
|
||||
lua_win->attach();
|
||||
}
|
||||
|
||||
// LUA scripts in TOOLS
|
||||
|
||||
@@ -71,15 +71,13 @@ StandaloneLuaWindow* StandaloneLuaWindow::instance()
|
||||
return _instance;
|
||||
}
|
||||
|
||||
void StandaloneLuaWindow::attach(Window* newParent)
|
||||
void StandaloneLuaWindow::attach()
|
||||
{
|
||||
if (!prevScreen) {
|
||||
|
||||
// backup previous screen
|
||||
prevScreen = lv_scr_act();
|
||||
|
||||
Window::attach(newParent->getFullScreenWindow());
|
||||
|
||||
// and load new one
|
||||
lv_scr_load(lvobj);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class StandaloneLuaWindow : public Window
|
||||
public:
|
||||
static StandaloneLuaWindow* instance();
|
||||
|
||||
void attach(Window* newParent);
|
||||
void attach();
|
||||
void deleteLater(bool detach = true, bool trash = true) override;
|
||||
void paint(BitmapBuffer* dc) override;
|
||||
void checkEvents() override;
|
||||
|
||||
Reference in New Issue
Block a user