Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_spreadsheet/spreadsheet_layout.cc
| Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | void draw_left_column_cell(int row_index, const CellDrawParams ¶ms) const final | ||||
| UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); | UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT); | ||||
| } | } | ||||
| void draw_content_cell(int row_index, int column_index, const CellDrawParams ¶ms) const final | void draw_content_cell(int row_index, int column_index, const CellDrawParams ¶ms) const final | ||||
| { | { | ||||
| const int real_index = spreadsheet_layout_.row_indices[row_index]; | const int real_index = spreadsheet_layout_.row_indices[row_index]; | ||||
| const ColumnValues &column = *spreadsheet_layout_.columns[column_index].values; | const ColumnValues &column = *spreadsheet_layout_.columns[column_index].values; | ||||
| CellValue cell_value; | CellValue cell_value; | ||||
| if (real_index < column.size()) { | |||||
| column.get_value(real_index, cell_value); | column.get_value(real_index, cell_value); | ||||
| } | |||||
| if (cell_value.value_int.has_value()) { | if (cell_value.value_int.has_value()) { | ||||
| const int value = *cell_value.value_int; | const int value = *cell_value.value_int; | ||||
| const std::string value_str = std::to_string(value); | const std::string value_str = std::to_string(value); | ||||
| uiBut *but = uiDefIconTextBut(params.block, | uiBut *but = uiDefIconTextBut(params.block, | ||||
| UI_BTYPE_LABEL, | UI_BTYPE_LABEL, | ||||
| 0, | 0, | ||||
| ICON_NONE, | ICON_NONE, | ||||
| ▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines | |||||