]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix computation of column widths.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 15 Aug 2013 19:23:09 +0000 (19:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 15 Aug 2013 19:23:09 +0000 (19:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@30317 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/table_handler.cc

index 425c09a8421d26bbe9eedad750e43bc6a3179119..831434c98db2e2cb934b8fbe2502909a56f5eb64 100644 (file)
@@ -366,6 +366,8 @@ void TableHandler::write_text(std::ostream &out,
       for (unsigned int j=0; j<n_cols; ++j)
         {
           const std::string &key = sel_columns[j];
+          column_widths[j] = std::max(column_widths[j],
+                                      (unsigned int)key.length());
           out << std::setw(column_widths[j]);
           out << key << " | ";
         }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.