Fixed a bug where cancelling an add widget dialogue would still add an invisible widget.