This patch fixes bug 2481 and goes in now since it is obviously correct.

Georg

Log:
Fix bug 2481
        * src/mathed/math_fracinset.[Ch]
        (MathFracInset::extraBraces): new, return true for \atop
        * src/mathed/math_binominset.[Ch]
        (MathBinomInset::extraBraces): new, return true for \choose
Index: src/mathed/math_fracinset.C
===================================================================
--- src/mathed/math_fracinset.C	(Revision 14468)
+++ src/mathed/math_fracinset.C	(Arbeitskopie)
@@ -141,6 +141,12 @@ string MathFracInset::name() const
 }
 
 
+bool MathFracInset::extraBraces() const
+{
+	return kind_ == ATOP;
+}
+
+
 void MathFracInset::maple(MapleStream & os) const
 {
 	os << '(' << cell(0) << ")/(" << cell(1) << ')';
Index: src/mathed/math_fracinset.h
===================================================================
--- src/mathed/math_fracinset.h	(Revision 14468)
+++ src/mathed/math_fracinset.h	(Arbeitskopie)
@@ -42,6 +42,8 @@ public:
 	MathFracInset const * asFracInset() const;
 	///
 	std::string name() const;
+	///
+	bool extraBraces() const;
 
 	///
 	void write(WriteStream & os) const;
Index: src/mathed/math_binominset.C
===================================================================
--- src/mathed/math_binominset.C	(Revision 14468)
+++ src/mathed/math_binominset.C	(Arbeitskopie)
@@ -68,6 +68,12 @@ void MathBinomInset::draw(PainterInfo & 
 }
 
 
+bool MathBinomInset::extraBraces() const
+{
+	return choose_;
+}
+
+
 void MathBinomInset::write(WriteStream & os) const
 {
 	if (choose_)
Index: src/mathed/math_binominset.h
===================================================================
--- src/mathed/math_binominset.h	(Revision 14468)
+++ src/mathed/math_binominset.h	(Arbeitskopie)
@@ -28,6 +28,8 @@ public:
 	void metrics(MetricsInfo & mi, Dimension & dim) const;
 	///
 	void draw(PainterInfo &, int x, int y) const;
+	///
+	bool extraBraces() const;
 private:
 	virtual std::auto_ptr<InsetBase> doClone() const;
 	///

Reply via email to