fix(MSD): confirmation dialog properly shown (#2743)
Prior to this fix, the confirmation dialog would crash because of an issue in libopenui and even then would not be displayed for the lack of the proper parent window. Fixes #2741
This commit is contained in:
@@ -25,10 +25,17 @@
|
||||
#include "opentx.h"
|
||||
#include "libopenui.h"
|
||||
|
||||
static Window* _get_parent()
|
||||
{
|
||||
Window* p = Layer::back();
|
||||
if (!p) p = MainWindow::instance();
|
||||
return p;
|
||||
}
|
||||
|
||||
FullScreenDialog::FullScreenDialog(
|
||||
uint8_t type, std::string title, std::string message, std::string action,
|
||||
const std::function<void(void)>& confirmHandler) :
|
||||
Window(Layer::back(), {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
Window(_get_parent(), {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
type(type),
|
||||
title(std::move(title)),
|
||||
message(std::move(message)),
|
||||
|
||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: 7b2fb83005...fbb92f83cf
Reference in New Issue
Block a user