Fix subgrid size calculation problem when zoom button is pressed.