]> git.lyx.org Git - features.git/commitdiff
* Buffer.cpp (getLanguages):
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 25 Feb 2010 18:00:43 +0000 (18:00 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 25 Feb 2010 18:00:43 +0000 (18:00 +0000)
- assure the buffer language is in the list.

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

src/Buffer.cpp

index 04ac90c0f96d5f99543d14e0f56364653c95f268..fc9fbc1b130c6e153be16973bb3bedad31faabeb 100644 (file)
@@ -2212,6 +2212,9 @@ std::set<Language const *> Buffer::getLanguages() const
 void Buffer::getLanguages(std::set<Language const *> & languages) const
 {
        ParConstIterator end = par_iterator_end();
+       // add the buffer language, even if it's not actively used
+       languages.insert(language());
+       // iterate over the paragraphs
        for (ParConstIterator it = par_iterator_begin(); it != end; ++it)
                it->getLanguages(languages);
        // also children