mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 06:07:45 +00:00
Fixed duplicate save file dialog
This commit is contained in:
parent
1b5905dc54
commit
96e1f8e7cd
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user