Skip to content

Commit

Permalink
Fix re-opening task editors
Browse files Browse the repository at this point in the history
Now, MainWindow.restore_editor_windows uses UUIDs instead of
strings to look up tasks in the data store.
  • Loading branch information
gycsaba96 authored and diegogangl committed Jul 1, 2024
1 parent 2f66ac5 commit a4d8584
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GTG/gtk/browser/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import logging
import ast
import re
from uuid import UUID
from typing import Optional

from gi.repository import GObject, Gtk, Gdk, Gio, GLib
Expand Down Expand Up @@ -638,7 +639,7 @@ def restore_editor_windows(self):

for tid in self.config.get("opened_tasks"):
try:
task = self.app.ds.tasks.lookup[tid]
task = self.app.ds.tasks.lookup[UUID(tid)]
self.app.open_task(task)
except KeyError:
log.warning("Could not restore task with id %s", tid)
Expand Down

0 comments on commit a4d8584

Please sign in to comment.