commit 6cd54aa6db9bb77426cfcd52b6154386bb9c1da7
Author: Enrico Forestieri <[email protected]>
Date:   Sat Aug 2 18:11:18 2025 +0200

    Amend 35aa4bda
    
    We check for different features using different
    LaTeXFeatures objects, so don't try to collect what
    has been already loaded in each instance, but explicitly
    check what has actually been loaded.
---
 src/LaTeXFeatures.cpp | 8 ++------
 src/LaTeXFeatures.h   | 2 --
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index bccc79ef64..6e48c15e42 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -775,11 +775,7 @@ bool LaTeXFeatures::isProvided(string const & name) const
 
 bool LaTeXFeatures::mustProvide(string const & name) const
 {
-       if (isRequired(name) && !isProvided(name)) {
-               features_loaded_.insert(name);
-               return true;
-       }
-       return false;
+       return isRequired(name) && !isProvided(name);
 }
 
 
@@ -1613,7 +1609,7 @@ string const LaTeXFeatures::getPackages() const
        // Account for unknown packages mentioned in the Require tag
        // of layouts/custom insets
        for (string const & name : features_) {
-               if (features_loaded_.find(name) == features_loaded_.end())
+               if (!mustProvide(name))
                        packages << "\\usepackage{" << name << "}\n";
        }
 
diff --git a/src/LaTeXFeatures.h b/src/LaTeXFeatures.h
index 2909a89e94..2d6fce25ca 100644
--- a/src/LaTeXFeatures.h
+++ b/src/LaTeXFeatures.h
@@ -224,8 +224,6 @@ private:
        Features features_;
        /// Features that are provided
        Features provides_;
-       /// Already accounted for features
-       mutable Features features_loaded_;
        /// Static preamble bits, from external templates, or anywhere else
        typedef std::list<TexString> SnippetList;
        ///
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to