1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 03:35:07 +00:00

LibGUI: GTableModel::data() should take a GModelIndex instead of int,int.

This commit is contained in:
Andreas Kling 2019-03-06 19:56:47 +01:00
parent dc4e6dd7bc
commit 7df1121e1c
6 changed files with 12 additions and 12 deletions

View file

@ -135,7 +135,7 @@ void GTableView::paint_event(GPaintEvent& event)
auto column_metadata = m_model->column_metadata(column_index);
int column_width = column_metadata.preferred_width;
Rect cell_rect(horizontal_padding() + x_offset, y, column_width, item_height());
auto data = m_model->data(row_index, column_index);
auto data = m_model->data({ row_index, column_index });
if (data.is_bitmap())
painter.blit(cell_rect.location(), data.as_bitmap(), data.as_bitmap().rect());
else