← All bug reports

FS#2380SaveAs doesn't always open the associated path of the active drawing

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.27.0
Operating system
Windows 7
Reported
2022-07-24 by CVH
Closed
2022-07-27 by andrew

QCAD Professional Win 7 WinInstaller

Version: 3.27.0.0 (3.27.0)
Internet: QCAD.org
Build Date: Nov 30 2021
Revision: 62c65de
Qt Version: 5.13.2
Architecture: i386
Compiler: Unknown

Related topic:
https://qcad.org/rsforum/viewtopic.php?f=31&p=37972#p37964

In script SaveAs.js on line 104 the sourced filename is correct.
When this is not empty on line 147 the fileDialog should select this file in its own path.
The testing sequence in the topic shows this is not always the case.
I am using the system file dialog.

Firts setting the corresponding folder for the fileDialog seems to fix this:
147 if (fileName.length!==0) {
148 fileDialog.setDirectory(fileInfo.absolutePath());
149 fileDialog.selectFile(fileInfo.absoluteFilePath());
150 }
151 else {
....

Regards,
CVH

Comments (2)

CVH 2022-07-25

Scouted for the string 'selectFile' in the repository and my installation folder and it occurs twice.

Once in File.js in conjunction with 'setDirectory' and once in SaveAs.js without setting the directory.
And in some of my custom scripts like Tile2Hatch but always in conjunction with 'setDirectory'.

Regards,
CVH

andrew 2022-07-27

Thanks for the fix.