Restrict type check to type field

This commit is contained in:
LBPHacker 2017-05-06 08:02:41 +02:00 committed by jacob1
parent e15bfac60f
commit e1d8e814a5

View File

@ -139,7 +139,7 @@ void PropertyWindow::SetProperty()
}
}
if (properties[property->GetOption().second].Type == StructProperty::ParticleType && (v < 0 || v >= PT_NUM || !sim->elements[v].Enabled))
if (properties[property->GetOption().second].Name == "type" && (v < 0 || v >= PT_NUM || !sim->elements[v].Enabled))
{
new ErrorMessage("Could not set property", "Invalid particle type");
return;