mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
Don't show invalid submodels in properties parts list. Fixes #787.
This commit is contained in:
parent
cdc730b5f7
commit
7716ffb6e6
1 changed files with 7 additions and 1 deletions
|
@ -517,9 +517,15 @@ QWidget *lcQPropertiesTree::createEditor(QWidget *parent, QTreeWidgetItem *item)
|
|||
lcPiecesLibrary* Library = lcGetPiecesLibrary();
|
||||
std::vector<PieceInfo*> SortedPieces;
|
||||
SortedPieces.reserve(Library->mPieces.size());
|
||||
const lcModel* ActiveModel = gMainWindow->GetActiveModel();
|
||||
|
||||
for (const auto& PartIt : Library->mPieces)
|
||||
{
|
||||
PieceInfo* Info = PartIt.second;
|
||||
|
||||
if (!Info->IsModel() || !Info->GetModel()->IncludesModel(ActiveModel))
|
||||
SortedPieces.push_back(PartIt.second);
|
||||
}
|
||||
|
||||
auto PieceCompare = [](PieceInfo* Info1, PieceInfo* Info2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue