Skip to content

Commit

Permalink
Name an OgreItem by the mesh filename if it doesn't have a name
Browse files Browse the repository at this point in the history
  • Loading branch information
chchwy committed Aug 11, 2020
1 parent 140c05b commit 69503b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/meshloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ bool MeshLoader::loadOgreMesh(QString filePath)
if (item == nullptr)
return false;

if (item->getName().empty())
{
item->setName(sNewMeshFile.toStdString());
}

attachMeshToSceneTree(item);
return true;
}
Expand Down

0 comments on commit 69503b8

Please sign in to comment.