]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Doc-de: update notation manual
[lilypond.git] / lily / grob.cc
index cc39c979f0e9cf146b40975b01f82ed9441d08bc..828ae7f07b40687457f8031475f0a42d9992dc67 100644 (file)
@@ -466,7 +466,10 @@ Grob::extent (Grob *refp, Axis a) const
       ((Grob *)this)->dim_cache_[a].extent_ = new Interval (real_ext);
     }
 
-  real_ext.translate (offset);
+  // We never want nan, so we avoid shifting infinite values.
+  for (LEFT_and_RIGHT (d))
+    if (!isinf (real_ext[d]))
+      real_ext[d] += offset;
 
   return real_ext;
 }