fix double open tab bug

This commit is contained in:
Sebastian Sdorra
2011-01-17 17:32:27 +01:00
parent 6c98251b10
commit aeb3239910

View File

@@ -92,13 +92,16 @@ Ext.onReady(function(){
// adds a tab to main TabPanel
function addTabPanel(id, xtype, title){
mainTabPanel.add({
id: id,
xtype: xtype,
title: title,
closable: true,
autoScroll: true
});
var tab = mainTabPanel.findById( id );
if ( tab == null ){
mainTabPanel.add({
id: id,
xtype: xtype,
title: title,
closable: true,
autoScroll: true
});
}
mainTabPanel.setActiveTab(id);
}