bugfix for error when a fixed width dialog is opened and then an auto-width dialog (adapted to height calculation)