Simplify model metadata updates and discovery names

Update model filenames and descriptions directly in SetModel, removing
metadata-only forwarding through the library and piece manager. Registry
renames remain synchronized in the manager.

Reuse the bounded piece-name normalizer for archive and directory discovery
to remove duplicated conversion loops and avoid writing a terminator past
the name buffer. Preserve original source filenames and archive offsets.

Validated with a warning-free Qt 6.10 Debug build and all 51 offscreen
lifecycle groups; diff whitespace checks pass.
This commit is contained in:
Leonardo Zide committed 2026-10-19 22:31:17 -07:00
1 parent 038e091af4
commit 29c1c142df
5 files changed
+24 -92

No files matched your search

+3 -1
View File
@@ -115,7 +115,9 @@ void lcPieceData::SetModel(lcModel* Model)
lcGetPiecesLibrary()->ClearPieceDataLoadError(this);
}
lcGetPiecesLibrary()->SetModelPieceDataName(this, Model->GetProperties().mFileName.toLatin1().data());
const QByteArray Name = Model->GetProperties().mFileName.toLatin1();
lcstrcpy(mFileName, Name.constData());
lcstrcpy(m_strDescription, Name.constData());
}
void lcPieceData::CreateProject(Project* NewProject, const char* PieceName)