Skip to content

Commit

Permalink
Merge pull request biolab#1824 from ajdapretnar/fix-image-viewere
Browse files Browse the repository at this point in the history
OWImageViewer: Fix missing images on windows
(cherry picked from commit 0572261)
  • Loading branch information
lanzagar authored and astaric committed Jan 18, 2017
1 parent 1978481 commit 0a01feb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Orange/widgets/data/owimageviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,11 @@ def urlFromValue(self, value):
if base.strip() and not base.endswith("/"):
origin.setPath(base + "/")

name = QUrl(str(value))
url = origin.resolved(name)
if os.path.exists(str(value)):
url = QUrl.fromLocalFile(str(value))
else:
name = QUrl(str(value))
url = origin.resolved(name)
if not url.scheme():
url.setScheme("file")
return url
Expand Down
Empty file.

0 comments on commit 0a01feb

Please sign in to comment.