$view->rename() should also go into the if statemant above. Either we do both (calculate new size and rename) or nothing