Skip to content

Commit

Permalink
Merge pull request #569 from opengisch/aoi_fix
Browse files Browse the repository at this point in the history
Fix packaging for cable does not respect area of interest settings
  • Loading branch information
suricactus committed Mar 5, 2024
2 parents 47f1974 + 4caeea1 commit 42ef2bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions qfieldsync/gui/package_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,20 @@ def package_project(self):
self.button_box.button(QDialogButtonBox.Save).setEnabled(False)

export_folder = self.get_export_folder_from_dialog()
area_of_interest = (
self.__project_configuration.area_of_interest
if self.__project_configuration.area_of_interest
else self.iface.mapCanvas().extent().asWktPolygon()
)
area_of_interest_crs = (
self.__project_configuration.area_of_interest_crs
if self.__project_configuration.area_of_interest_crs
else QgsProject.instance().crs().authid()
)
if self.__project_configuration.offline_copy_only_aoi:
area_of_interest = (
self.__project_configuration.area_of_interest
if self.__project_configuration.area_of_interest
else self.iface.mapCanvas().extent().asWktPolygon()
)
area_of_interest_crs = (
self.__project_configuration.area_of_interest_crs
if self.__project_configuration.area_of_interest_crs
else QgsProject.instance().crs().authid()
)
else:
area_of_interest = ""
area_of_interest_crs = QgsProject.instance().crs().authid()

self.qfield_preferences.set_value("exportDirectoryProject", export_folder)
self.dirsToCopyWidget.save_settings()
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ future
transifex-client

# NOTE `libqfielsync` version should be defined in the `*.tar.gz` format, not `git+https://` to make `wheel` happy
libqfieldsync @ https://github.com/opengisch/libqfieldsync/archive/3c0b0c4903d0a5e6944779d4d43a64e29542bd87.tar.gz
libqfieldsync @ https://github.com/opengisch/libqfieldsync/archive/7936c96967f2e9b350b7039ea7bb88f3947ee588.tar.gz

0 comments on commit 42ef2bb

Please sign in to comment.