|
@@ -99,11 +99,14 @@ def event_loop(window):
|
|
|
print('Error: Task name ' + sub_task_name + ' already used, please enter another one')
|
|
|
elif sub_task_name:
|
|
|
parent_task_name = window.Element(TASK_TREE_COMBO_NAME).get()
|
|
|
- parent_task_id = taskHandler.get_task_id(parent_task_name)
|
|
|
- print('Adding new Sub-Task: ' + sub_task_name + ' to ' + parent_task_name.strip())
|
|
|
- taskHandler.add_task(parent_task_id, sub_task_name)
|
|
|
- window.Element(TASK_TREE_COMBO_NAME).update(
|
|
|
- values=taskHandler.get_task_tree_name_strings(taskHandler.root_task))
|
|
|
+ if parent_task_name:
|
|
|
+ parent_task_id = taskHandler.get_task_id(parent_task_name)
|
|
|
+ print('Adding new Sub-Task: ' + sub_task_name + ' to ' + parent_task_name.strip())
|
|
|
+ taskHandler.add_task(parent_task_id, sub_task_name)
|
|
|
+ window.Element(TASK_TREE_COMBO_NAME).update(
|
|
|
+ values=taskHandler.get_task_tree_name_strings(taskHandler.root_task))
|
|
|
+ else:
|
|
|
+ print('Please select a Task before adding a subtask')
|
|
|
|
|
|
|
|
|
def gui_main():
|