Skip to content

Commit

Permalink
AddonManager: Fixed image links
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jun 27, 2019
1 parent 115ff01 commit 4906772
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/Mod/AddonManager/addonmanager_workers.py
Expand Up @@ -200,10 +200,14 @@ def run(self):
repo = git.Repo(clonedir)
repo.head.reset('--hard')
gitrepo = git.Git(clonedir)
gitrepo.fetch()
if "git pull" in gitrepo.status():
self.mark.emit(repo[0])
upds.append(repo[0])
try:
gitrepo.fetch()
except:
print("AddonManager: Unable to fetch git updates for repo",repo[0])
else:
if "git pull" in gitrepo.status():
self.mark.emit(repo[0])
upds.append(repo[0])
self.enable.emit(len(upds))
self.stop = True

Expand Down Expand Up @@ -436,7 +440,8 @@ def loadImages(self,message,url,wbName):
pix = QtGui.QPixmap()
pix = pix.fromImage(img.scaled(300,300,QtCore.Qt.KeepAspectRatio,QtCore.Qt.FastTransformation))
pix.save(storename, "jpeg",100)
message = message.replace(origpath,"file:///"+storename.replace("\\","/"))
message = message.replace("src=\""+origpath,"src=\"file:///"+storename.replace("\\","/"))
#print(message)
return message
return None

Expand Down

0 comments on commit 4906772

Please sign in to comment.