mirror of
https://github.com/leozide/leocad
synced 2024-11-16 07:47:27 +01:00
Fixed submodels not displaying correctly. Fixes #922.
This commit is contained in:
parent
c4318dd8aa
commit
ed53e5ffe0
1 changed files with 2 additions and 2 deletions
|
@ -169,9 +169,9 @@ PieceInfo* lcPiecesLibrary::FindPiece(const char* PieceName, Project* CurrentPro
|
|||
PieceInfo* Info = PieceIt->second;
|
||||
bool HasModel = false;
|
||||
|
||||
if (lcGetActiveProject())
|
||||
if (CurrentProject)
|
||||
{
|
||||
const std::vector<std::unique_ptr<lcModel>>& Models = lcGetActiveProject()->GetModels();
|
||||
const std::vector<std::unique_ptr<lcModel>>& Models = CurrentProject->GetModels();
|
||||
HasModel = std::find_if(Models.begin(), Models.end(), [Model = Info->GetModel()](const std::unique_ptr<lcModel>& CheckModel) { return CheckModel.get() == Model; }) != Models.end();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue