]> git.lyx.org Git - lyx.git/blobdiff - src/CoordCache.h
Amend 207eaeee9071cb
[lyx.git] / src / CoordCache.h
index b99cbe6ddd1d5ccb674d8b896a901efba766bbcf..f960c24b1bd6e1aa8a945ce1230613f7aa9bbf39 100644 (file)
@@ -31,8 +31,10 @@ struct Geometry {
 
        bool covers(int x, int y) const
        {
-               return x >= pos.x_ && x < pos.x_ + dim.wid
-                      && y >= pos.y_ - dim.asc && y <= pos.y_ + dim.des;
+               return x >= pos.x_
+                       && x <= pos.x_ + dim.wid
+                       && y >= pos.y_ - dim.asc
+                       && y <= pos.y_ + dim.des;
        }
 
        int squareDistance(int x, int y) const
@@ -80,13 +82,13 @@ public:
 
        Geometry & geometry(T const * thing)
        {
-               check(thing, "geometry");
+               checkDim(thing, "geometry");
                return data_.find(thing)->second;
        }
 
        Geometry const & geometry(T const * thing) const
        {
-               check(thing, "geometry");
+               checkDim(thing, "geometry");
                return data_.find(thing)->second;
        }