<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Jari,<br>
    <br>
    the problem could be FCSystemStaves (probably you use it for
    calculating the staff system height based on its distances).<br>
    I noticed that FCSystemStaves doesn't include staves if they are set
    to "cut away" or "in Score only (Collapse)". But it does include
    them when they are set to "collapse" - so although the staff is then
    invisible in the staff system it counts as a system staff.<br>
    <br>
    That means: if the "last staff" in a staff system is set to
    "collapse" it is still included in FCSystemStaves and thus also
    taken into account for CalcHeight. This returns a staff system
    height which doesn't match the actual staff system height.<br>
    <br>
    Best,<br>
    Jan<br>
  </body>
</html>