[Label] Fix Options/Add windows not reopening

When a user clicked ESC key or X button, the Options and Add windows
didn't open again. This happened because the windows were closed and
not hidden, which deleted the instance of those windows.

This fix changed the behavior of the close action to 'hide'.
This commit is contained in:
DjLegolas 2019-06-24 21:02:58 +03:00 committed by Calum Lind
parent 0c7f53e305
commit 3f9ae33793
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,7 @@ Deluge.ux.AddLabelWindow = Ext.extend(Ext.Window, {
title: _('Add Label'), title: _('Add Label'),
width: 300, width: 300,
height: 100, height: 100,
closeAction: 'hide',
initComponent: function() { initComponent: function() {
Deluge.ux.AddLabelWindow.superclass.initComponent.call(this); Deluge.ux.AddLabelWindow.superclass.initComponent.call(this);
@ -124,6 +125,7 @@ Deluge.ux.LabelOptionsWindow = Ext.extend(Ext.Window, {
title: _('Label Options'), title: _('Label Options'),
width: 325, width: 325,
height: 240, height: 240,
closeAction: 'hide',
initComponent: function() { initComponent: function() {
Deluge.ux.LabelOptionsWindow.superclass.initComponent.call(this); Deluge.ux.LabelOptionsWindow.superclass.initComponent.call(this);