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
This commit is contained in:
Tiago Almeida
2025-03-24 14:52:15 +00:00
committed by Chris Hennes
parent c197032384
commit 9153926cbf

View File

@@ -315,7 +315,7 @@ MaterialLibraryLocal::saveMaterial(const std::shared_ptr<Material>& 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);