mirror of
https://github.com/leozide/leocad.git
synced 2026-10-27 06:20:55 +00:00
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:
1 parent
038e091af4
commit
29c1c142df
5 files changed
+24
-92
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user