From 96e1f8e7cd1c824e68b992ffb7dbf9f488aa5578 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 26 Mar 2016 11:13:57 +0300 Subject: [PATCH] Fixed duplicate save file dialog --- Telegram/SourceFiles/structs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 85932fb314..1223807303 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -951,7 +951,7 @@ void GifOpenLink::onClick(Qt::MouseButton button) const { void DocumentSaveLink::doSave(DocumentData *data, bool forceSavingAs) { if (!data->date) return; - QString filepath = data->filepath(DocumentData::FilePathResolveSaveFromData, forceSavingAs); + QString filepath = data->filepath(DocumentData::FilePathResolveSaveFromDataSilent, forceSavingAs); if (!filepath.isEmpty() && !forceSavingAs) { QPoint pos(QCursor::pos()); if (!psShowOpenWithMenu(pos.x(), pos.y(), filepath)) { @@ -1376,7 +1376,7 @@ QString DocumentData::filepath(FilePathResolveType type, bool forceSavingAs) con if (saveFromData) { if (type != FilePathResolveSaveFromData && type != FilePathResolveSaveFromDataSilent) { saveFromData = false; - } else if (type == FilePathResolveSaveFromDataSilent && cAskDownloadPath()) { + } else if (type == FilePathResolveSaveFromDataSilent && (cAskDownloadPath() || forceSavingAs)) { saveFromData = false; } }