]> git.lyx.org Git - features.git/commitdiff
Avoid errorList copy.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 25 Jan 2007 10:39:40 +0000 (10:39 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 25 Jan 2007 10:39:40 +0000 (10:39 +0000)
* ControlErrorList:
  - error_list_: deleted
  - error_type_: new private member.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16849 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ControlErrorList.C
src/frontends/controllers/ControlErrorList.h

index 6e572ab4c1247ac00feaab379e272c27fc732a8a..a93bf9c797f4f2454ee4940134647040efdd90da 100644 (file)
@@ -45,18 +45,18 @@ void ControlErrorList::clearParams()
 
 ErrorList const & ControlErrorList::errorList() const
 {
-       return errorlist_;
+       return kernel().bufferview()->buffer()->errorList(error_type_);
 }
 
 
 bool ControlErrorList::initialiseParams(string const & error_type)
 {
+       error_type_ = error_type;
        Buffer * buf = kernel().bufferview()->buffer();
        // FIXME UNICODE
        docstring const title = bformat(_("%1$s Errors (%2$s)"),
                                     _(error_type),
                                     lyx::from_utf8(buf->fileName()));
-       errorlist_ = buf->errorList(error_type);
        name_ = lyx::to_utf8(title);
        return true;
 }
@@ -70,7 +70,7 @@ string const & ControlErrorList::name()
 
 void ControlErrorList::goTo(int item)
 {
-       ErrorItem const & err = errorlist_[item];
+       ErrorItem const & err = errorList()[item];
 
        if (err.par_id == -1)
                return;
index 17d3ec1a41d7e9528f4176ac774baa19903ca6e1..a66e8bc640a3ea7a564c38bcb134b8fe40a29ebe 100644 (file)
@@ -41,7 +41,7 @@ public:
        ErrorList const & errorList() const;
 private:
        ///
-       ErrorList errorlist_;
+       std::string error_type_;
        ///
        std::string name_;
 };