From cc76efd38be8c245572adeb83489dca9c4887f8a Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Thu, 8 Oct 2020 10:57:29 +0200 Subject: [PATCH] [Table] Custom cells not refreshed --- radio/src/thirdparty/libopenui/src/table.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/radio/src/thirdparty/libopenui/src/table.cpp b/radio/src/thirdparty/libopenui/src/table.cpp index 3d2f021d1..aa8e5b6cb 100644 --- a/radio/src/thirdparty/libopenui/src/table.cpp +++ b/radio/src/thirdparty/libopenui/src/table.cpp @@ -40,9 +40,8 @@ void Table::Body::checkEvents() Window::checkEvents(); coord_t y = 0; - coord_t x; for (auto line: lines) { - x = 10; + coord_t x = 10; for (unsigned i = 0; i < line->cells.size(); i++) { auto cell = line->cells[i]; auto width = columnsWidth[i]; @@ -51,19 +50,19 @@ void Table::Body::checkEvents() } x += width; } + y += TABLE_LINE_HEIGHT; } } void Table::Body::paint(BitmapBuffer * dc) { coord_t y = 0; - coord_t x; int index = 0; dc->clear(DEFAULT_BGCOLOR); for (auto line: lines) { bool highlight = (index == selection); dc->drawSolidFilledRect(0, y, width(), TABLE_LINE_HEIGHT - 2, highlight ? MENU_HIGHLIGHT_BGCOLOR : TABLE_BGCOLOR); - x = 10; + coord_t x = 10; for (unsigned i = 0; i < line->cells.size(); i++) { auto cell = line->cells[i]; if (cell) {