[Bf-blender-cvs] [5c067189e3d] master: Fix T87434: spreadsheet shows same column more than once
Jacques Lucke
noreply at git.blender.org
Thu Apr 15 13:19:40 CEST 2021
Commit: 5c067189e3d8e648ae2900032860c3513827939a
Author: Jacques Lucke
Date: Thu Apr 15 13:19:27 2021 +0200
Branches: master
https://developer.blender.org/rB5c067189e3d8e648ae2900032860c3513827939a
Fix T87434: spreadsheet shows same column more than once
===================================================================
M source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
===================================================================
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
index dc85d86e776..520d29ce306 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc
@@ -89,6 +89,9 @@ std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values(
int domain_size = attribute->size();
switch (attribute->custom_data_type()) {
case CD_PROP_FLOAT:
+ if (column_id.index != -1) {
+ return {};
+ }
return column_values_from_function(
column_id.name, domain_size, [attribute](int index, CellValue &r_cell_value) {
float value;
@@ -96,6 +99,9 @@ std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values(
r_cell_value.value_float = value;
});
case CD_PROP_INT32:
+ if (column_id.index != -1) {
+ return {};
+ }
return column_values_from_function(
column_id.name, domain_size, [attribute](int index, CellValue &r_cell_value) {
int value;
@@ -103,6 +109,9 @@ std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values(
r_cell_value.value_int = value;
});
case CD_PROP_BOOL:
+ if (column_id.index != -1) {
+ return {};
+ }
return column_values_from_function(
column_id.name, domain_size, [attribute](int index, CellValue &r_cell_value) {
bool value;
More information about the Bf-blender-cvs
mailing list