Fixed subparts not updating stud style.

This commit is contained in:
Leonardo Zide 2021-01-23 14:55:00 -08:00
parent 728980c97a
commit 03b9c75d9e
3 changed files with 2 additions and 3 deletions

View file

@ -1213,7 +1213,6 @@ void lcApplication::ShowPreferencesDialog()
lcGetPiecesLibrary()->LoadColors();
}
gMainWindow->SetShadingMode(Options.Preferences.mShadingMode);
lcView::UpdateAllViews();
}

View file

@ -1580,7 +1580,7 @@ void lcPiecesLibrary::SetStudStyle(lcStudStyle StudStyle, bool Reload)
{
lcLibraryPrimitive* Primitive = PrimitiveIt.second;
if (Primitive->mStudStyle)
if (Primitive->mStudStyle || Primitive->mMeshData.mHasStyleStud)
Primitive->Unload();
}
}

View file

@ -1625,7 +1625,7 @@ bool lcMeshLoader::ReadMeshData(lcFile& File, const lcMatrix44& CurrentTransform
else
Library->GetPrimitiveFile(Primitive, FileCallback);
mMeshData.mHasStyleStud |= Primitive->mStudStyle;
mMeshData.mHasStyleStud |= Primitive->mStudStyle | Primitive->mMeshData.mHasStyleStud;
}
else
Library->GetPieceFile(FileName, FileCallback);