コード例 #1
0
ファイル: listener.py プロジェクト: wangdyna/wxPython
 def OnComponentCreate(self, evt):
     '''Hadnler for creating new elements.'''
     comp = Manager.findById(evt.GetId())
     g.undoMan.RegisterUndo(undo.UndoGlobal())  # !!! TODO
     if comp.groups[0] == 'component':
         node = Model.createComponentNode('Component')
         Presenter.create(comp, node)
     else:
         Presenter.create(comp)
コード例 #2
0
ファイル: listener.py プロジェクト: RupertTheSlim/Programming
 def OnComponentCreate(self, evt):
     '''Hadnler for creating new elements.'''
     comp = Manager.findById(evt.GetId())
     g.undoMan.RegisterUndo(undo.UndoGlobal()) # !!! TODO
     if comp.groups[0] == 'component':
         node = Model.createComponentNode('Component')
         Presenter.create(comp, node)
     else:
         Presenter.create(comp)
コード例 #3
0
 def OnComponentCreate(self, evt):
     '''Hadnler for creating new elements.'''
     state = self.tree.GetFullState()  # state just before
     comp = Manager.findById(evt.GetId())
     if comp.groups[0] == 'component':
         node = Model.createComponentNode('Component')
         item = Presenter.create(comp, node)
     else:
         item = Presenter.create(comp)
     itemIndex = self.tree.ItemFullIndex(item)
     g.undoMan.RegisterUndo(undo.UndoPasteCreate(itemIndex, state))
コード例 #4
0
ファイル: listener.py プロジェクト: e-johnson/AndroidProject
 def OnComponentCreate(self, evt):
     '''Hadnler for creating new elements.'''
     state = self.tree.GetFullState() # state just before
     comp = Manager.findById(evt.GetId())
     if comp.groups[0] == 'component':
         node = Model.createComponentNode('Component')
         item = Presenter.create(comp, node)
     else:
         item = Presenter.create(comp)
     itemIndex = self.tree.ItemFullIndex(item)
     g.undoMan.RegisterUndo(undo.UndoPasteCreate(itemIndex, state))