Exemple #1
0
 def ok(self):
     self._treeCtrl.ExpandAll()
     for item in self._treeCtrl.GetItemChildren(recursively=True):
         index = self._treeCtrl.GetIndexOfItem(item)
         category = self.getCategoryWithIndex(index)
         if item.IsChecked():
             category.addCategorizable(self._note)
             self._note.addCategory(category)
         else:
             category.removeCategorizable(self._note)
             self._note.removeCategory(category)
Exemple #2
0
 def ok(self):
     treeCtrl = self._categoryViewer.widget
     treeCtrl.ExpandAll()
     for categoryNode in treeCtrl.GetItemChildren(recursively=True):
         categoryIndex = treeCtrl.GetIndexOfItem(categoryNode)
         category = self._categoryViewer.getItemWithIndex(categoryIndex)
         if categoryNode.IsChecked():
             category.addCategorizable(self.item)
             self.item.addCategory(category)
         else:
             category.removeCategorizable(self.item)
             self.item.removeCategory(category)