Skip to content

Commit

Permalink
- allow to set visibility to auto
Browse files Browse the repository at this point in the history
  • Loading branch information
aschnell committed Oct 1, 2024
1 parent 3388893 commit 78ddfa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/utils/TableFormatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ namespace snapper
if (table.has_id(id))
table.set_trim(id, true);

for (Id id : table_formatter._auto_visibility)
if (table.has_id(id))
table.set_visibility(id, Visibility::AUTO);

for (const vector<string>& row : table_formatter._rows)
{
Table::Row table_row(table);
Expand Down
2 changes: 2 additions & 0 deletions client/utils/TableFormatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ namespace snapper
vector<Cell>& header() { return _header; }
vector<Id>& abbreviate() { return _abbreviate; }
vector<Id>& trim() { return _trim; }
vector<Id>& auto_visibility() { return _auto_visibility; }
vector<vector<string>>& rows() { return _rows; }

friend ostream& operator<<(ostream& stream, const TableFormatter& table_formatter);
Expand All @@ -63,6 +64,7 @@ namespace snapper
vector<Cell> _header;
vector<Id> _abbreviate;
vector<Id> _trim;
vector<Id> _auto_visibility;
vector<vector<string>> _rows;

};
Expand Down

0 comments on commit 78ddfa3

Please sign in to comment.