# HG changeset patch # User lbessard # Date 1183127096 -7200 # Node ID e435bbec1759fc44e325d53c146bbb6e996aab50 # Parent 4fd03ee0c30e555d62d469fb5a02ec2c11e1c8a4 Bug on file loading from shell command fixed diff -r 4fd03ee0c30e -r e435bbec1759 objdictgen/objdictedit.py --- a/objdictgen/objdictedit.py Thu Jun 28 16:29:41 2007 +0200 +++ b/objdictgen/objdictedit.py Fri Jun 29 16:24:56 2007 +0200 @@ -341,10 +341,15 @@ self.Manager = NodeManager(ScriptDirectory) for filepath in filesOpen: - self.Manager.OpenFileInCurrent(filepath) - new_editingpanel = EditingPanel(self, self.Manager) - self.FileOpened.AddPage(new_editingpanel, "") - self.FileOpened.SetSelection(self.Manager.GetCurrentNodeIndex()) + result = self.Manager.OpenFileInCurrent(filepath) + if type(result) == IntType: + new_editingpanel = EditingPanel(self, self.Manager) + new_editingpanel.SetIndex(result) + self.FileOpened.AddPage(new_editingpanel, "") + window = self.FileOpened.GetPage(0) + if window: + self.Manager.ChangeCurrentNode(window.GetIndex()) + self.FileOpened.SetSelection(0) if self.Manager.CurrentDS302Defined(): self.EditMenu.Enable(wxID_OBJDICTEDITEDITMENUITEMS8, True) else: