Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-09-08 07:31:46 +0300
committerHans Goudey <h.goudey@me.com>2022-09-08 07:31:46 +0300
commit9f50bd20eb3b5a2d19ec6858755f1cda60927e84 (patch)
tree3e3717f903df10877f0ff2649dc64f65a3fd84e3 /source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc
parentd5934974219135102f364f57c45a8b1465e2b8d9 (diff)
Fix: Spreadsheet row filters unimplemented for boolean type
This was lost in 474adc6f883c2d5a85
Diffstat (limited to 'source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc')
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc
index 6806e185cfe..03cf0116dce 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_row_filter.cc
@@ -71,6 +71,14 @@ static void apply_row_filter(const SpreadsheetRowFilter &row_filter,
}
}
}
+ else if (column_data.type().is<bool>()) {
+ const bool value = (row_filter.flag & SPREADSHEET_ROW_FILTER_BOOL_VALUE) != 0;
+ apply_filter_operation(
+ column_data.typed<bool>(),
+ [&](const bool cell) { return cell == value; },
+ prev_mask,
+ new_indices);
+ }
else if (column_data.type().is<int8_t>()) {
const int value = row_filter.value_int;
switch (row_filter.operation) {
@@ -274,7 +282,6 @@ static void apply_row_filter(const SpreadsheetRowFilter &row_filter,
}
else if (column_data.type().is<InstanceReference>()) {
const StringRef value = row_filter.value_string;
-
apply_filter_operation(
column_data.typed<InstanceReference>(),
[&](const InstanceReference cell) {