コード例 #1
0
ファイル: objects.py プロジェクト: giruenf/GRIPy
 def detach(self):
     """Detach a object vinculated to a ObjectManager object 
     by attach function.
     
     Called automatic from UIManager.remove function.
     """
     if self._attached_to is None:
         return
     #        print ('DETACHING...')
     try:
         OM = ObjectManager()
         OM.unsubscribe(self._check_OM_removals, 'pre_remove')
         #            print ('DETACHED {} FROM {}! \n'.format(self.uid, self._attached_to))
         self._attached_to = None
     except Exception as e:
         print('ERROR WHILE DETACHING:', e)
コード例 #2
0
ファイル: tree.py プロジェクト: giruenf/GRIPy
 def PreDelete(self):
     OM = ObjectManager()
     OM.unsubscribe(self._on_OM_object_added, 'add')
     OM.unsubscribe(self._on_OM_object_removed, 'post_remove')
コード例 #3
0
 def _on_OM_add(self, objuid):
     if objuid != self.uid:
         return
     OM = ObjectManager()
     OM.unsubscribe(self._on_OM_add, 'add')