Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2020-09-10 12:30:01 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-09-10 12:30:13 +0300
commit3168fd6dade4d7f6c1157f4e5ea9b3f8ff067a9a (patch)
treea3fd7f93ccccd8636e611e14ab46830cda566ba1 /blenderkit
parent54e52f64d76d4b2cf77099a27a4c48a536e6a75b (diff)
BlenderKit: fix cancelling of download
until now, cancelling a download always cancelled the last download, not the one clicked on
Diffstat (limited to 'blenderkit')
-rw-r--r--blenderkit/ui_panels.py5
-rw-r--r--blenderkit/upload.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index d70c8b69..7f51f5c5 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -1318,13 +1318,14 @@ class VIEW3D_PT_blenderkit_downloads(Panel):
def draw(self, context):
layout = self.layout
- for threaddata in download.download_threads:
+ for i,threaddata in enumerate(download.download_threads):
tcom = threaddata[2]
asset_data = threaddata[1]
row = layout.row()
row.label(text=asset_data['name'])
row.label(text=str(int(tcom.progress)) + ' %')
- row.operator('scene.blenderkit_download_kill', text='', icon='CANCEL')
+ op = row.operator('scene.blenderkit_download_kill', text='', icon='CANCEL')
+ op.thread_index = i
if tcom.passargs.get('retry_counter', 0) > 0:
row = layout.row()
row.label(text='failed. retrying ... ', icon='ERROR')
diff --git a/blenderkit/upload.py b/blenderkit/upload.py
index 8e547cbc..ef637d79 100644
--- a/blenderkit/upload.py
+++ b/blenderkit/upload.py
@@ -817,7 +817,7 @@ class AssetVerificationStatusChange(Operator):
preferences = bpy.context.preferences.addons['blenderkit'].preferences
if not bpy.context.scene['search results']:
- return;
+ return {'CANCELLED'};
# update status in search results for validator's clarity
sr = bpy.context.scene['search results']
sro = bpy.context.scene['search results orig']['results']