fix onChange method with closed repository panel

This commit is contained in:
Sebastian Sdorra
2011-11-19 17:05:53 +01:00
parent 00aac3fd4a
commit fb9f2c269c

View File

@@ -295,11 +295,20 @@ Sonia.History.register('repositoryPanel', {
if ( ! panel ){
main.addRepositoriesTabPanel();
panel = Ext.getCmp('repositories');
if ( repoId ){
var selected = false;
panel.getGrid().getStore().addListener('load', function(){
if (!selected){
panel.getGrid().selectedById(repoId);
selected = true;
}
});
}
} else {
main.addTab(panel);
}
if (repoId){
panel.getGrid().selectById(repoId);
if (repoId){
panel.getGrid().selectById(repoId);
}
}
}
});