mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
For the Flatpak package : remove the file name extension added
automatically to the saved files even if the user sets an unknown file extension for the program.
This commit is contained in:
@@ -1237,9 +1237,9 @@ bool QETElementEditor::slot_saveAsFile()
|
|||||||
if (fn.isEmpty())
|
if (fn.isEmpty())
|
||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
//If the name doesn't end by .elmt, we add it
|
// //If the name doesn't end by .elmt, we add it
|
||||||
if (!fn.endsWith(".elmt", Qt::CaseInsensitive))
|
// if (!fn.endsWith(".elmt", Qt::CaseInsensitive))
|
||||||
fn += ".elmt";
|
// fn += ".elmt";
|
||||||
|
|
||||||
bool result_save = toFile(fn);
|
bool result_save = toFile(fn);
|
||||||
//If the save success, the filename is keep
|
//If the save success, the filename is keep
|
||||||
|
|||||||
@@ -320,8 +320,8 @@ QString ProjectView::askUserForFilePath(bool assign) {
|
|||||||
// if no filepath is provided, return an empty string
|
// if no filepath is provided, return an empty string
|
||||||
if (filepath.isEmpty()) return(filepath);
|
if (filepath.isEmpty()) return(filepath);
|
||||||
|
|
||||||
// if the name does not end with the .qet extension, append it
|
// // if the name does not end with the .qet extension, append it
|
||||||
if (!filepath.endsWith(".qet", Qt::CaseInsensitive)) filepath += ".qet";
|
// if (!filepath.endsWith(".qet", Qt::CaseInsensitive)) filepath += ".qet";
|
||||||
|
|
||||||
if (assign) {
|
if (assign) {
|
||||||
// assign the provided filepath to the currently edited project
|
// assign the provided filepath to the currently edited project
|
||||||
|
|||||||
Reference in New Issue
Block a user