mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
3D Preview - ignore update if existing piece and color matches
This commit is contained in:
parent
959c815ad1
commit
bdc4061a79
1 changed files with 11 additions and 1 deletions
|
@ -107,9 +107,19 @@ bool lcPreviewWidget::SetCurrentPiece(const QString& PartType, int ColorCode)
|
||||||
|
|
||||||
if (Info)
|
if (Info)
|
||||||
{
|
{
|
||||||
|
lcModel* ActiveModel = GetActiveModel();
|
||||||
|
for (lcPiece* ModelPiece : ActiveModel->GetPieces())
|
||||||
|
{
|
||||||
|
if (Info == ModelPiece->mPieceInfo)
|
||||||
|
{
|
||||||
|
int ModelColorCode = ModelPiece->mColorCode;
|
||||||
|
if (ModelColorCode == ColorCode)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mIsModel = Info->IsModel();
|
mIsModel = Info->IsModel();
|
||||||
mDescription = Info->m_strDescription;
|
mDescription = Info->m_strDescription;
|
||||||
lcModel* ActiveModel = GetActiveModel();
|
|
||||||
|
|
||||||
ActiveModel->SelectAllPieces();
|
ActiveModel->SelectAllPieces();
|
||||||
ActiveModel->DeleteSelectedObjects();
|
ActiveModel->DeleteSelectedObjects();
|
||||||
|
|
Loading…
Reference in a new issue