]> 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 e2e898cfa3285ec4c8add61925336d41371a51ae..939e4b89a82a63b41da6dc726a9c665f5bb683fb 100644 (file)
 #include <config.h>
 
 #include "math_diminset.h"
+#include "coordcache.h"
 #include "debug.h"
 
 
 MathDimInset::MathDimInset()
-       : xo_(-3), yo_(-3) // some sentinel value for debugging
 {}
 
 
@@ -40,6 +40,5 @@ int MathDimInset::width() const
 void MathDimInset::setPosCache(PainterInfo const &, int x, int y) const
 {
        //lyxerr << "MathDimInset: cache to " << x << " " << y << std::endl;
-       xo_ = x;
-       yo_ = y;
+       theCoords.insets().add(this, x, y);
 }