]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_diminset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_diminset.C
index 23a595639b18af9fd5342c3a90e283c948051efd..939e4b89a82a63b41da6dc726a9c665f5bb683fb 100644 (file)
@@ -1,24 +1,44 @@
+/**
+ * \file math_diminset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
 #include "math_diminset.h"
+#include "coordcache.h"
+#include "debug.h"
 
 
 MathDimInset::MathDimInset()
-       : MathInset(), width_(0), ascent_(0), descent_(0)
 {}
 
 
 int MathDimInset::ascent() const
 {
-       return ascent_;
+       return dim_.asc;
 }
 
 
 int MathDimInset::descent() const
 {
-       return descent_;
+       return dim_.des;
 }
 
 
 int MathDimInset::width() const
 {
-       return width_;
+       return dim_.wid;
+}
+
+
+void MathDimInset::setPosCache(PainterInfo const &, int x, int y) const
+{
+       //lyxerr << "MathDimInset: cache to " << x << " " << y << std::endl;
+       theCoords.insets().add(this, x, y);
 }