mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-08 21:58:16 +02:00
Qt: fixed bug when setting filename of TSaveDialog.
git-svn-id: trunk@47742 -
This commit is contained in:
parent
f156ddb773
commit
2dce61002c
@ -349,11 +349,12 @@ begin
|
|||||||
else
|
else
|
||||||
QtFileDialog.setFileMode(QFileDialogAnyFile);
|
QtFileDialog.setFileMode(QFileDialogAnyFile);
|
||||||
|
|
||||||
if (AFileDialog.FileName <> '') and FileExistsUTF8(AFileDialog.FileName) and
|
if (AFileDialog.FileName <> '') and
|
||||||
not DirectoryExistsUTF8(AFileDialog.FileName) then
|
not DirectoryExistsUTF8(AFileDialog.FileName) then
|
||||||
begin
|
begin
|
||||||
ATitle := GetUTF8String(AFileDialog.FileName);
|
ATitle := GetUTF8String(AFileDialog.FileName);
|
||||||
QFileDialog_selectFile(QFileDialogH(QtFileDialog.Widget), @ATitle);
|
if (AFileDialog is TSaveDialog) or FileExistsUTF8(AFileDialog.FileName) then
|
||||||
|
QFileDialog_selectFile(QFileDialogH(QtFileDialog.Widget), @ATitle);
|
||||||
{$ifndef QT_NATIVE_DIALOGS}
|
{$ifndef QT_NATIVE_DIALOGS}
|
||||||
if (AFileDialog is TOpenPictureDialog) then
|
if (AFileDialog is TOpenPictureDialog) then
|
||||||
TQtFilePreviewDialog(QtFileDialog).CurrentChangedEvent(@ATitle);
|
TQtFilePreviewDialog(QtFileDialog).CurrentChangedEvent(@ATitle);
|
||||||
|
Loading…
Reference in New Issue
Block a user