commit a8eb474090986183f45d0d326c8d575ed661f794
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Sun Jul 5 21:12:04 2026 +0200

    Since Display is a combination of flags, testing is more tricky.
---
 src/TextMetrics.cpp        | 2 +-
 src/mathed/InsetMathHull.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index b8dd127987..a7548d57d4 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1896,7 +1896,7 @@ int TextMetrics::leftMargin(pit_type const pit, pos_type 
const pos, bool ignore_
            && !(!ignore_contents
                 && !par.empty()
                 && par.isInset(0)
-                && par.getInset(0)->rowFlags() & Display)
+                && (par.getInset(0)->rowFlags() & Display) == Display)
            && (!(tclass.isDefaultLayout(par.layout())
                || tclass.isPlainLayout(par.layout()))
                || buffer.params().paragraph_separation
diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h
index b6c748a5ca..3924562abe 100644
--- a/src/mathed/InsetMathHull.h
+++ b/src/mathed/InsetMathHull.h
@@ -290,7 +290,7 @@ public:
        ///
        int rowFlags() const override;
        /// helper function
-       bool display() const { return rowFlags() & Display; }
+       bool display() const { return (rowFlags() & Display) == Display; }
 
        ///
        int indent(BufferView const &) const override;
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to