Skip to content

Commit

Permalink
Look for parent in due date binding
Browse files Browse the repository at this point in the history
If the task's parent has a due date then we should show sub-tasks
as having that due date.

fix #1072
  • Loading branch information
diegogangl committed Jul 23, 2024
1 parent f501dfb commit efad798
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions GTG/core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,10 @@ def is_recurring(self) -> bool:

@GObject.Property(type=bool, default=False)
def has_date_due(self) -> bool:
return self._has_date_due
if not self._has_date_due and self.parent:
return self.parent._has_date_due
else:
return self._has_date_due


@has_date_due.setter
Expand Down Expand Up @@ -593,7 +596,10 @@ def set_date_start_str(self, value) -> None:

@GObject.Property(type=str)
def date_due_str(self) -> str:
return self._date_due_str
if not self._date_due_str and self.parent:
return self.parent._date_due_str
else:
return self._date_due_str


@date_due_str.setter
Expand Down

0 comments on commit efad798

Please sign in to comment.