mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Fixed duplicate save file dialog
This commit is contained in:
@@ -951,7 +951,7 @@ void GifOpenLink::onClick(Qt::MouseButton button) const {
|
|||||||
void DocumentSaveLink::doSave(DocumentData *data, bool forceSavingAs) {
|
void DocumentSaveLink::doSave(DocumentData *data, bool forceSavingAs) {
|
||||||
if (!data->date) return;
|
if (!data->date) return;
|
||||||
|
|
||||||
QString filepath = data->filepath(DocumentData::FilePathResolveSaveFromData, forceSavingAs);
|
QString filepath = data->filepath(DocumentData::FilePathResolveSaveFromDataSilent, forceSavingAs);
|
||||||
if (!filepath.isEmpty() && !forceSavingAs) {
|
if (!filepath.isEmpty() && !forceSavingAs) {
|
||||||
QPoint pos(QCursor::pos());
|
QPoint pos(QCursor::pos());
|
||||||
if (!psShowOpenWithMenu(pos.x(), pos.y(), filepath)) {
|
if (!psShowOpenWithMenu(pos.x(), pos.y(), filepath)) {
|
||||||
@@ -1376,7 +1376,7 @@ QString DocumentData::filepath(FilePathResolveType type, bool forceSavingAs) con
|
|||||||
if (saveFromData) {
|
if (saveFromData) {
|
||||||
if (type != FilePathResolveSaveFromData && type != FilePathResolveSaveFromDataSilent) {
|
if (type != FilePathResolveSaveFromData && type != FilePathResolveSaveFromDataSilent) {
|
||||||
saveFromData = false;
|
saveFromData = false;
|
||||||
} else if (type == FilePathResolveSaveFromDataSilent && cAskDownloadPath()) {
|
} else if (type == FilePathResolveSaveFromDataSilent && (cAskDownloadPath() || forceSavingAs)) {
|
||||||
saveFromData = false;
|
saveFromData = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user