From 67871b905ae1e36b03a6107133415863361d5b44 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 16 Feb 2021 12:54:51 +0100 Subject: [PATCH] client: edit_activty: don't touch self.date on date changes The fact is recalculated already in on_start_date_change(). By calling the setter of self.date the fact would be change a second time. The start_date was then wrong by the delta. E.g. edit a complete fact (start and end must be set). Click on the start date and choose 2 days into the future, the command line shows now 4 days into the future. Fixes: #667 --- src/hamster/edit_activity.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hamster/edit_activity.py b/src/hamster/edit_activity.py index d904a40fd..6e0d135dc 100644 --- a/src/hamster/edit_activity.py +++ b/src/hamster/edit_activity.py @@ -248,7 +248,6 @@ def on_start_date_changed(self, widget): # preserve fact duration self.fact.end_time += delta self.end_date.date = self.fact.end_time - self.date = self.fact.date or dt.hday.today() self.validate_fields() self.update_cmdline()