material: fixes #25817 prevent unecessary save over dialogue

This commit is contained in:
chris jones @ipatch
2026-02-13 15:32:46 -06:00
committed by Chris Hennes
parent 885b8cf1de
commit 4938a6f75b
+3 -1
View File
@@ -139,7 +139,9 @@ void MaterialSave::onOk(bool checked)
QFileInfo filepath(_selectedPath + QStringLiteral("/") + name
+ QStringLiteral(".FCMat"));
/*if (library->fileExists(filepath.filePath()))*/ {
auto localLibrary = std::dynamic_pointer_cast<Materials::MaterialLibraryLocal>(library);
if (localLibrary && localLibrary->fileExists(filepath.filePath()))
{
// confirm overwrite
auto res = confirmOverwrite(_filename);
if (res == QMessageBox::Cancel) {