From 001769997d5bef263ec0c658181a2b1993a04f83 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 May 2011 15:14:42 -0400 Subject: [PATCH] Bug - The entry.age column did not modify the column label of 'Added' to be 'Age'. --- src/columns/ColEntry.cpp | 10 ++++++++++ src/columns/ColEntry.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/columns/ColEntry.cpp b/src/columns/ColEntry.cpp index ae9b50634..8eac52cf7 100644 --- a/src/columns/ColEntry.cpp +++ b/src/columns/ColEntry.cpp @@ -40,3 +40,13 @@ ColumnEntry::~ColumnEntry () } //////////////////////////////////////////////////////////////////////////////// +// Overriden so that style <----> label are linked. +// Note that you can not determine which gets called first. +void ColumnEntry::setStyle (const std::string& value) +{ + _style = value; + + if (_style == "age" && _label == "Added") _label = "Age"; +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/columns/ColEntry.h b/src/columns/ColEntry.h index 251df58e2..ad1972f8a 100644 --- a/src/columns/ColEntry.h +++ b/src/columns/ColEntry.h @@ -34,6 +34,8 @@ class ColumnEntry : public ColumnDate public: ColumnEntry (); ~ColumnEntry (); + + void setStyle (const std::string&); }; #endif