only update viewport if there was a change