调整保存的文件名格式

This commit is contained in:
yangjiaxuan 2022-08-12 09:28:30 +08:00
parent 15fcd5b22a
commit 8285de5e94
1 changed files with 4 additions and 1 deletions

View File

@ -183,7 +183,10 @@ void Dialog_SaveAs::on_dialog_accepted()
{
QString path = selectedFile.left(pos + 1);
QString name = selectedFile.right(selectedFile.count() - pos - 1);
pos = name.lastIndexOf(extName);
if(name.endsWith(extName))
{
pos = name.lastIndexOf(extName);
}
if (-1 != pos)
name = name.left(pos);