material: fixes #25817 prevent unecessary save over dialogue
This commit is contained in:
committed by
Chris Hennes
parent
885b8cf1de
commit
4938a6f75b
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user