From 9ed3cf011fc97f251f00be18d4b5541cc7297cb1 Mon Sep 17 00:00:00 2001 From: Tiago Almeida Date: Mon, 24 Mar 2025 14:52:15 +0000 Subject: [PATCH] fix #20005: material editor issue -Changed info.baseName() to info.fileName().remove(QStringLiteral(".FCMat"), Qt::CaseInsensitive) in MaterialLibrary.cpp to ensure that only the extension ".FCmat" is removed from the file name bacause the previous version was removing everything in front of the first dot --- src/Mod/Material/App/MaterialLibrary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Material/App/MaterialLibrary.cpp b/src/Mod/Material/App/MaterialLibrary.cpp index 14446afeb0..76f46a5e50 100644 --- a/src/Mod/Material/App/MaterialLibrary.cpp +++ b/src/Mod/Material/App/MaterialLibrary.cpp @@ -315,7 +315,7 @@ MaterialLibraryLocal::saveMaterial(const std::shared_ptr& material, stream.setGenerateByteOrderMark(true); // Write the contents - material->setName(info.baseName()); + material->setName(info.fileName().remove(QStringLiteral(".FCMat"), Qt::CaseInsensitive)); material->setLibrary(getptr()); material->setDirectory(getRelativePath(path)); material->save(stream, overwrite, saveAsCopy, saveInherited);