Ejemplo n.º 1
0
 def _deleteClicked(self, *args):
     current = _pmCore.textScrollList(self._textScrollList, query=True, selectItem=True)
     if not current:
         raise RuntimeError('Must select a category to delete.')
     current = current[0]
     if _Database.getAssetUnderCategory(current):
         raise RuntimeError('Can not delete category {0}, there are asset under this category.'.format(current))
     _Database.deleteCategory(current)
     _pmCore.textScrollList(self._textScrollList, edit=True, removeItem=current)
     
     self._updateCallback(None, None, current)