Skip to content

Commit

Permalink
Merge pull request #939 from aschnell/master
Browse files Browse the repository at this point in the history
- allow to set visibility to auto
  • Loading branch information
aschnell authored Oct 1, 2024
2 parents 950c3b1 + 78ddfa3 commit 8c7721f
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 8c7721f

Please sign in to comment.