def _new_task(self): parent_uuid = None task_type = None if self._items_path: parent_uuid = self._items_path[-1].uuid if self._items_path[-1].type == enums.TYPE_CHECKLIST: task_type = enums.TYPE_CHECKLIST_ITEM if not task_type: group_id = self['rb_show_selection'].GetSelection() task_type = enums.TYPE_TASK if group_id == 5 and not self._items_path: task_type = enums.TYPE_PROJECT elif group_id == 6 and not self._items_path: task_type = enums.TYPE_CHECKLIST TaskController.new_task(self.wnd, task_type or enums.TYPE_TASK, parent_uuid)
def _on_menu_new_task(self, _evt): TaskController.new_task(self._frame, None)