recalculate display_scale in a loop instead of randomly(through qt data()  ) and only when it makes sense to