Skip to content

Commit

Permalink
fix(color): Wrong input could be used for updating curve preview (#4390)
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz authored Dec 9, 2023
1 parent ad16bf6 commit b4f5ed5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions radio/src/gui/colorlcd/input_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,11 @@ void InputEditWindow::buildBody(FormWindow* form)
});
lv_obj_set_width(btn->getLvObj(), lv_pct(100));
}

void InputEditWindow::deleteLater(bool detach, bool trash)
{
if (!deleted()) {
CurveEdit::SetCurrentSource(0);
Page::deleteLater(detach, trash);
}
}
2 changes: 2 additions & 0 deletions radio/src/gui/colorlcd/input_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ class InputEditWindow : public Page
Curve* preview;

void buildBody(FormWindow *window);

void deleteLater(bool detach = true, bool trash = true) override;
};
8 changes: 8 additions & 0 deletions radio/src/gui/colorlcd/mixer_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,11 @@ void MixEditWindow::buildBody(FormWindow* form)
});
lv_obj_set_width(btn->getLvObj(), lv_pct(100));
}

void MixEditWindow::deleteLater(bool detach, bool trash)
{
if (!deleted()) {
CurveEdit::SetCurrentSource(0);
Page::deleteLater(detach, trash);
}
}
2 changes: 2 additions & 0 deletions radio/src/gui/colorlcd/mixer_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ class MixEditWindow : public Page

void buildHeader(Window *window);
void buildBody(FormWindow *window);

void deleteLater(bool detach = true, bool trash = true) override;
};

0 comments on commit b4f5ed5

Please sign in to comment.