Skip to content

Commit

Permalink
When we are in the context manager, we still need access to the layers
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Apr 18, 2024
1 parent 5ca1aa8 commit 8bd891f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libqfieldsync/utils/bad_layer_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ class set_bad_layer_handler:

def __init__(self, project: QgsProject):
self.project = project
setattr(
self.project,
"__libqfieldsync_bad_layers_by_id",
bad_layer_handler.invalid_layer_sources_by_id,
)

def __enter__(self):
bad_layer_handler.clear()
Expand Down

0 comments on commit 8bd891f

Please sign in to comment.