Bug correction total grad

Total grad was recalculate when preview mode  activated.
the result was the total grade was null.