From 78ddfa3d25e61189c69e85102f0384f756c3ca6b Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Tue, 1 Oct 2024 16:04:39 +0200 Subject: [PATCH] - allow to set visibility to auto --- client/utils/TableFormatter.cc | 4 ++++ client/utils/TableFormatter.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/client/utils/TableFormatter.cc b/client/utils/TableFormatter.cc index d7c69ea7..e4af586f 100644 --- a/client/utils/TableFormatter.cc +++ b/client/utils/TableFormatter.cc @@ -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& row : table_formatter._rows) { Table::Row table_row(table); diff --git a/client/utils/TableFormatter.h b/client/utils/TableFormatter.h index 3cbada30..7d7a181c 100644 --- a/client/utils/TableFormatter.h +++ b/client/utils/TableFormatter.h @@ -52,6 +52,7 @@ namespace snapper vector& header() { return _header; } vector& abbreviate() { return _abbreviate; } vector& trim() { return _trim; } + vector& auto_visibility() { return _auto_visibility; } vector>& rows() { return _rows; } friend ostream& operator<<(ostream& stream, const TableFormatter& table_formatter); @@ -63,6 +64,7 @@ namespace snapper vector _header; vector _abbreviate; vector _trim; + vector _auto_visibility; vector> _rows; };