diff options
author | rtk0c <[email protected]> | 2021-07-04 14:16:20 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-07-04 14:16:20 -0700 |
commit | 4d63ee38f79172ccfdcce47aa293f56efb5d0c59 (patch) | |
tree | cca0b5e343b28a7cea71199fce76a169cf465a5e /core/src/Model/Template | |
parent | c2c9452cdd6f50923c02d59c68087add8d17f03a (diff) |
Improve table cell visuals
Diffstat (limited to 'core/src/Model/Template')
-rw-r--r-- | core/src/Model/Template/TableTemplate.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/core/src/Model/Template/TableTemplate.cpp b/core/src/Model/Template/TableTemplate.cpp index ce1d6a5..adf79fe 100644 --- a/core/src/Model/Template/TableTemplate.cpp +++ b/core/src/Model/Template/TableTemplate.cpp @@ -276,7 +276,26 @@ TableArrayGroup* TableTemplate::AddArrayGroup(std::string_view name, int row, in .LeftCell = left, .RightCell = right, }); - return &mArrayGroups.back(); + auto& ag = mArrayGroups.back(); + + for (int x = left; x <= right; x++) { + auto& cell = GetCell({ x, row }); + + // Update type + cell.Type = TableCell::ArrayParametricCell; + + // Insert parameter name lookup + while (true) { + auto [DISCARD, inserted] = ag.mName2Cell.insert(cell.Content, x); + if (inserted) { + break; + } + + cell.Content += "-"; + } + } + + return &ag; } bool TableTemplate::UpdateArrayGroupName(std::string_view oldName, std::string_view newName) |