Skip to content

Commit

Permalink
enforce only single fetch of asset media type in case the STAC item a…
Browse files Browse the repository at this point in the history
…sset media type is not avaialable
  • Loading branch information
Samweli committed Apr 13, 2023
1 parent 8b22248 commit a868804
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qgis_stac/gui/asset_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ def initialize_ui(self):

self.title_la.setText(self.asset.title)
self.type_la.setText(self.asset.type)
asset_load = self.asset_loadable()

self.load_box.setEnabled(self.asset_loadable())
self.load_box.setEnabled(asset_load)
self.load_box.toggled.connect(self.asset_load_selected)
self.load_box.stateChanged.connect(self.asset_load_selected)
self.download_box.toggled.connect(self.asset_download_selected)
self.download_box.stateChanged.connect(self.asset_download_selected)

if self.asset_loadable():
if asset_load:
self.load_box.setToolTip(
tr("Asset contains {} media type which "
"cannot be loaded as a map layer in QGIS"
Expand Down

0 comments on commit a868804

Please sign in to comment.