Navigation fix in telemetry page
This commit is contained in:
@@ -64,6 +64,8 @@ class SensorButton : public Button {
|
|||||||
if (telemetryItem.isFresh()) {
|
if (telemetryItem.isFresh()) {
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button::checkEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
void paint(BitmapBuffer * dc) override
|
void paint(BitmapBuffer * dc) override
|
||||||
@@ -102,7 +104,7 @@ class SensorButton : public Button {
|
|||||||
|
|
||||||
class SensorEditWindow : public Page {
|
class SensorEditWindow : public Page {
|
||||||
public:
|
public:
|
||||||
SensorEditWindow(uint8_t index) :
|
explicit SensorEditWindow(uint8_t index) :
|
||||||
Page(ICON_MODEL_TELEMETRY),
|
Page(ICON_MODEL_TELEMETRY),
|
||||||
index(index)
|
index(index)
|
||||||
{
|
{
|
||||||
@@ -110,7 +112,7 @@ class SensorEditWindow : public Page {
|
|||||||
buildHeader(&header);
|
buildHeader(&header);
|
||||||
}
|
}
|
||||||
|
|
||||||
~SensorEditWindow()
|
~SensorEditWindow() override
|
||||||
{
|
{
|
||||||
body.deleteChildren();
|
body.deleteChildren();
|
||||||
}
|
}
|
||||||
@@ -483,9 +485,9 @@ void ModelTelemetryPage::build(FormWindow * window, int8_t focusSensorIndex)
|
|||||||
// New sensor button
|
// New sensor button
|
||||||
new TextButton(window, grid.getLineSlot(), STR_TELEMETRY_NEWSENSOR,
|
new TextButton(window, grid.getLineSlot(), STR_TELEMETRY_NEWSENSOR,
|
||||||
[=]() -> uint8_t {
|
[=]() -> uint8_t {
|
||||||
int res = availableTelemetryIndex();
|
int idx = availableTelemetryIndex();
|
||||||
if (res >= 0)
|
if (idx >= 0)
|
||||||
editSensor(window, res);
|
editSensor(window, idx);
|
||||||
else
|
else
|
||||||
new FullScreenDialog(WARNING_TYPE_ALERT, "", STR_TELEMETRYFULL);
|
new FullScreenDialog(WARNING_TYPE_ALERT, "", STR_TELEMETRYFULL);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user