fix(desktop/profile): Ensure that the file is selected in FileDialog

Fix #5238
This commit is contained in:
Michal Iskierko 2022-04-06 11:50:25 +02:00 committed by Iuri Matias
parent a16592c61f
commit f067d59612
1 changed files with 4 additions and 2 deletions

View File

@ -81,8 +81,10 @@ StatusModal {
qsTrId("image-files----jpg---jpeg---png-")
]
onAccepted: {
cropImageModal.selectedImage = imageDialog.fileUrls[0];
cropImageModal.open()
if(imageDialog.fileUrls.length > 0) {
cropImageModal.selectedImage = imageDialog.fileUrls[0];
cropImageModal.open()
}
}
}
}