]> git.lyx.org Git - lyx.git/blobdiff - src/FuncStatus.C
correctly display messages issued by getStatus
[lyx.git] / src / FuncStatus.C
index 3e0c615096db04054d8f63173b824a315c20c5a5..2f0cf8e064bd3792cc37e6bdd91fd2c595f7f247 100644 (file)
@@ -12,6 +12,8 @@
 
 #include "FuncStatus.h"
 
+using std::string;
+
 FuncStatus::FuncStatus() : v_(OK)
 {
 }
@@ -20,12 +22,15 @@ FuncStatus::FuncStatus() : v_(OK)
 void FuncStatus::clear()
 {
        v_ = OK;
+       message_.erase();
 }
 
 
 void FuncStatus::operator|=(FuncStatus const & f)
 {
        v_ |= f.v_;
+       if (!f.message_.empty())
+               message_ = f.message_;
 }
 
 
@@ -73,3 +78,15 @@ bool FuncStatus::onoff(bool b) const
        else
                return (v_ & OFF);
 }
+
+
+void FuncStatus::message(string const & m)
+{
+       message_ = m;
+}
+
+
+string const & FuncStatus::message() const
+{
+       return message_;
+}