os.chdir
This commit is contained in:
parent
4d1addfa63
commit
91b558775a
2 changed files with 2 additions and 0 deletions
|
|
@ -444,6 +444,7 @@ class Profile(Contact, Singleton):
|
|||
avatar_path = (ProfileHelper.get_path() + 'avatars/{}.png').format(friend.tox_id[:TOX_PUBLIC_KEY_SIZE * 2])
|
||||
if not os.path.isfile(avatar_path): # load default image
|
||||
avatar_path = curr_directory() + '/images/avatar.png'
|
||||
os.chdir(os.path.dirname(avatar_path))
|
||||
pixmap = QtGui.QPixmap(QtCore.QSize(64, 64))
|
||||
pixmap.load(avatar_path)
|
||||
self._screen.account_avatar.setScaledContents(False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue