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,6 +92,8 @@ Ext.onReady(function(){
// adds a tab to main TabPanel
function addTabPanel(id, xtype, title){
var tab = mainTabPanel.findById( id );
if ( tab == null ){
mainTabPanel.add({
id: id,
xtype: xtype,
@@ -99,6 +101,7 @@ Ext.onReady(function(){
closable: true,
autoScroll: true
});
}
mainTabPanel.setActiveTab(id);
}