[OE-4288] Fixed forced closing of dialog.

Dialog show not close itself when determining actual dimensions.