File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
python/plugins/processing/gui Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -89,17 +89,22 @@ def linkClicked(url):
89
89
90
90
isText , algHelp = self .alg .help ()
91
91
if algHelp is not None :
92
- algHelp = algHelp if isText else QUrl (algHelp )
93
92
try :
94
93
if isText :
95
94
self .txtHelp .setHtml (algHelp )
96
95
else :
97
- html = self .tr ('<p>Downloading algorithm help... Please wait.</p>' )
98
- self .txtHelp .setHtml (html )
99
- rq = QNetworkRequest (algHelp )
100
- self .reply = QgsNetworkAccessManager .instance ().get (rq )
101
- self .reply .finished .connect (self .requestFinished )
102
- except Exception , e :
96
+ if algHelp .startswith ('http' ):
97
+ html = self .tr ('<p>Downloading algorithm help... Please wait.</p>' )
98
+ self .txtHelp .setHtml (html )
99
+ rq = QNetworkRequest (QUrl (algHelp ))
100
+ self .reply = QgsNetworkAccessManager .instance ().get (rq )
101
+ self .reply .finished .connect (self .requestFinished )
102
+ else :
103
+ if algHelp .startswith ('file://' ):
104
+ p = os .path .dirname (algHelp [7 :])
105
+ self .txtHelp .setSearchPaths ([p ])
106
+ self .txtHelp .setSource (QUrl (algHelp ))
107
+ except Exception as e :
103
108
self .tabWidget .removeTab (2 )
104
109
else :
105
110
self .tabWidget .removeTab (2 )
You can’t perform that action at this time.
0 commit comments