diff --git a/radio/src/thirdparty/libopenui/src/table.cpp b/radio/src/thirdparty/libopenui/src/table.cpp
index aa8e5b6cb..b64a31c0b 100644
--- a/radio/src/thirdparty/libopenui/src/table.cpp
+++ b/radio/src/thirdparty/libopenui/src/table.cpp
@@ -30,7 +30,7 @@ void Table::Header::paint(BitmapBuffer * dc)
if (cell) {
cell->paint(dc, x, 0, TABLE_HEADER_FONT);
}
- x += columnsWidth[i];
+ x += static_cast
(parent)->columnsWidth[i];
}
}
}
@@ -44,7 +44,7 @@ void Table::Body::checkEvents()
coord_t x = 10;
for (unsigned i = 0; i < line->cells.size(); i++) {
auto cell = line->cells[i];
- auto width = columnsWidth[i];
+ auto width = static_cast(parent)->columnsWidth[i];
if (cell && cell->needsInvalidate()) {
invalidate({x, y, width, TABLE_LINE_HEIGHT - 2});
}
@@ -68,7 +68,7 @@ void Table::Body::paint(BitmapBuffer * dc)
if (cell) {
cell->paint(dc, x, y, line->flags | (highlight ? MENU_HIGHLIGHT_COLOR : DEFAULT_COLOR));
}
- x += columnsWidth[i];
+ x += static_cast(parent)->columnsWidth[i];
}
y += TABLE_LINE_HEIGHT;
index += 1;
diff --git a/radio/src/thirdparty/libopenui/src/table.h b/radio/src/thirdparty/libopenui/src/table.h
index f217bf2ee..4cbcff089 100644
--- a/radio/src/thirdparty/libopenui/src/table.h
+++ b/radio/src/thirdparty/libopenui/src/table.h
@@ -126,8 +126,7 @@ class Table: public FormField {
public:
Header(Table * parent, const rect_t & rect, uint8_t columnsCount):
Window(parent, rect, OPAQUE),
- Line(columnsCount),
- columnsWidth(parent->columnsWidth)
+ Line(columnsCount)
{
}
@@ -139,9 +138,6 @@ class Table: public FormField {
#endif
void paint(BitmapBuffer * dc) override;
-
- protected:
- std::vector & columnsWidth;
};
class Body: public Window {
@@ -149,8 +145,7 @@ class Table: public FormField {
public:
Body(Table * parent, const rect_t & rect, WindowFlags windowFlags):
- Window(parent, rect, windowFlags),
- columnsWidth(parent->columnsWidth)
+ Window(parent, rect, windowFlags)
{
}
@@ -225,7 +220,6 @@ class Table: public FormField {
void checkEvents() override;
protected:
- std::vector & columnsWidth;
std::vector lines;
int selection = -1;
};
@@ -270,7 +264,7 @@ class Table: public FormField {
restWidth -= columnWidth;
}
}
- if (restColumn) {
+ if (restColumn >= 0) {
columnsWidth[restColumn] = restWidth;
}
}