Commits

Aleš Erjavec committed caa4c3b

Show error (exception string) in tool-tip.

  • Participants
  • Parent commits a6ab0b9

Comments (0)

Files changed (1)

File Orange/OrangeWidgets/Data/OWImageViewer.py

                         if future.exception():
                             # Should be some generic error image.
                             pixmap = QPixmap()
+                            thumb.setToolTip(unicode(thumb.toolTip()) + "\n" +
+                                             str(future.exception()))
                         else:
                             pixmap = QPixmap.fromImage(future.result())
                         thumb.setPixmap(pixmap)
                 origin.setScheme("file")
         else:
             origin = QUrl("")
-        if not unicode(origin.path()).endswith("/"):
-            origin.setPath(unicode(origin.path()) + "/")
+        base = unicode(origin.path())
+        if base.strip() and not base.endswith("/"):
+            origin.setPath(base + "/")
 
         name = QUrl(str(value))
-        return origin.resolved(name)
+        url = origin.resolved(name)
+        if not url.scheme():
+            url.setScheme("file")
+        return url
 
     def clearScene(self):
         for item in self.items: