fix removing filters that no longer exist

add a filtercreate event
This commit is contained in:
Damien Churchill 2010-04-24 02:31:33 +01:00
parent 62158d7861
commit 1825ce09fb
1 changed files with 4 additions and 1 deletions

View File

@ -109,6 +109,7 @@
this.doLayout();
this.panels[filter] = panel;
this.fireEvent('filtercreate', this, panel);
},
getFilters: function() {
@ -164,7 +165,9 @@
Ext.each(Ext.keys(this.panels), function(filter) {
if (Ext.keys(filters).indexOf(filter) == -1) {
// We need to remove the panel
this.panels[filter]
this.remove(this.panels[filter]);
this.doLayout();
delete this.panels[filter];
}
}, this);
},