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

Use Task.set_status to mark tasks as done or active #1183

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

gycsaba96
Copy link
Contributor

@gycsaba96 gycsaba96 commented Feb 2, 2025

Fixes #1180

Somehow, setting the task done was triggered twice: in TaskEditor.change_status and in MainWindow.on_mark_as_done. Since MainWindow.on_mark_as_done also used Task.toggle_status, the effect was reversed.

Some remarks:

  • I don't clearly see why was the set_status triggered twice, but since fixing MainWindow.on_mark_as_done fixes the problem, I would say it is a question for another day.
  • Dismissing tasks may have similar problems, but I couldn't yet reproduce the bug (see MainWindow.on_dismiss_task).

Copy link
Contributor

@SqAtx SqAtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at my bug!

I'm not intimate with that part of the code and I'm just looking at the diff, but it looks like you're making it so that the code does what we mean! It was making assumptions that it didn't need to make. LGTM!

@diegogangl
Copy link
Contributor

TBH I don't remember why I used toggle_active() instead of setting the status. Probably porting something from a previous version? Anyways, this LGTM. Thanks!

@diegogangl diegogangl merged commit cd348da into getting-things-gnome:master Feb 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Children get marked undone after marking parent as done
3 participants