fix SwapView height calculation, fixes #17050,#15761 thx sbrunot