fixed Download button in mediaview

This commit is contained in:
John Preston 2014-11-24 10:54:06 +03:00
parent a09460dc84
commit a4c13e0720
1 changed files with 2 additions and 0 deletions

View File

@ -273,6 +273,7 @@ void MediaView::onDownload() {
if (cur.isEmpty()) {
_save.hide();
} else {
if (!QDir().exists(path)) QDir().mkpath(path);
toName = filedialogNextFilename(_doc->name, cur, path);
if (toName != cur && !QFile(cur).copy(toName)) {
toName = QString();
@ -282,6 +283,7 @@ void MediaView::onDownload() {
if (!_photo || !_photo->full->loaded()) {
_save.hide();
} else {
if (!QDir().exists(path)) QDir().mkpath(path);
toName = filedialogDefaultName(qsl("photo"), qsl(".jpg"), path);
if (!_photo->full->pix().toImage().save(toName, "JPG")) {
toName = QString();