[ui] Inspector3D: add media contextual menu

Contextual menu to expose additional actions:
 * open media containing folder
 * copy media path
 * advanced manual control over media (un)loading
+ fix MediaLibrary to avoid binding loop on 'visible' when directly modifying 'request' property
This commit is contained in:
Yann Lanthony 2018-12-10 13:23:20 +01:00
parent 272cd24fb9
commit c3750a33c3
3 changed files with 37 additions and 5 deletions

View file

@ -72,3 +72,9 @@ class FilepathHelper(QObject):
def stringToUrl(self, path):
""" Convert a path (string) to a QUrl using 'QUrl.fromLocalFile' method """
return QUrl.fromLocalFile(path)
@Slot(str, result=str)
@Slot(QUrl, result=str)
def normpath(self, path):
""" Returns native normalized path """
return os.path.normpath(self.asStr(path))