Skip to content

Commit

Permalink
Rearrange if statement for cached sections
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjamesnugent committed Jul 17, 2023
1 parent da69891 commit b4a1cdd
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ private static Dictionary<string, ISectionProperty> GetSectionMaterialCombinatio
materials.TryGetValue(materialId.ToString(), out material);
sectionProperties.TryGetValue(sectionPropertyId.ToString(), out section);

if (section is ISectionProperty)
if(section is SteelSection || section is ConcreteSection || section is AluminiumSection || section is TimberSection)
{
materialSections.Add(materialId.ToString() + "," + sectionPropertyId.ToString(), section);
}
else
{
//Needed to get the ShapeProfile
GenericSection genericSection = (GenericSection)section;
Expand Down Expand Up @@ -101,10 +105,6 @@ private static Dictionary<string, ISectionProperty> GetSectionMaterialCombinatio
break;
}
}
else
{
materialSections.Add(materialId.ToString() + "," + sectionPropertyId.ToString(),section);
}

}

Expand Down

0 comments on commit b4a1cdd

Please sign in to comment.