Skip to content

Commit

Permalink
Fixed submodels not displaying correctly. Fixes #922.
Browse files Browse the repository at this point in the history
  • Loading branch information
leozide committed Jul 17, 2024
1 parent c4318dd commit ed53e5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/lc_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit ed53e5f

Please sign in to comment.