Skip to content

Commit

Permalink
Update the pane's filter when updating the start date of a task
Browse files Browse the repository at this point in the history
  • Loading branch information
SqAtx committed Mar 10, 2024
1 parent 083353f commit 1dfb459
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ flatpak/bundles

# src/ usually has development version of liblarch
src/

# Python virtual environments
venv*/
10 changes: 10 additions & 0 deletions GTG/gtk/browser/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,11 @@ def update_start_date(self, widget, new_start_date):
for task in self.get_pane().get_selection():
task.date_start = new_start_date

# Changing the start date of a task may take it out of the current pane
# (e.g. setting the start date of an Actionable task to tomorrow)
# See #1039
self.get_pane().task_filter.changed(Gtk.FilterChange.DIFFERENT)

def update_start_to_next_day(self, day_number):
"""Update start date to N days from today."""

Expand All @@ -1041,6 +1046,11 @@ def update_start_to_next_day(self, day_number):
for task in self.get_pane().get_selection():
task.date_start = next_day

# Changing the start date of a task may take it out of the current pane
# (e.g. setting the start date of an Actionable task to tomorrow)
# See #1039
self.get_pane().task_filter.changed(Gtk.FilterChange.DIFFERENT)


def on_mark_as_started(self, action, param):
self.update_start_date(None, "today")
Expand Down

0 comments on commit 1dfb459

Please sign in to comment.