Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenience functions for adding and removing children #1188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gycsaba96
Copy link
Contributor

The main motivation behind this PR is to simplify the cases when class A emits a signal on class B because class C did something. E.g., the Task class can manage the update of its has_children property alone. (Overriding these methods can also help realising when a task is no longer actionable.)

The main changes are as follows:

  • introduce the StoreItem.add_child and StoreItem.remove_child methods (automatically trigger signals and potentially other functionality)
  • add unit tests for the methods above
  • leverage these methods in the BaseStore, TaskStore and TagStore

@diegogangl
Copy link
Contributor

I'm testing this with "Add Subtask" and "Add Parent Task" from the RMB menu, and it looks like the new tasks dissapear after closing the task editor?

- introduce the StoreItem.add_child and StoreItem.remove_child
  methods (automatically trigger signals and potentially other
  functionality)
- add unit tests for the methods above
- leverage these methods in the BaseStore, TaskStore and TagStore
@gycsaba96 gycsaba96 force-pushed the add-and-remove-child branch from 6fdaf06 to c0cb707 Compare February 18, 2025 17:04
@gycsaba96
Copy link
Contributor Author

gycsaba96 commented Feb 18, 2025

I rebased the branch so that it has PR #1175 in it. It seems to solve the "Add Subtask" part. Unfortunately, I can not reproduce the problem with the "Add Parent Task" option. Could you please provide more details if the bug is still there?

(However, the editor does not open when the task already has a parent. But this bug was present in earlier versions as well.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants