also check .Enabled in PROP
This commit is contained in:
parent
135bf44347
commit
a5ae843553
@ -139,7 +139,7 @@ void PropertyWindow::SetProperty()
|
||||
buffer.exceptions(std::stringstream::failbit | std::stringstream::badbit);
|
||||
buffer >> tempInt;
|
||||
}
|
||||
if (property->GetOption().first == "type" && (tempInt < 0 || tempInt >= PT_NUM))
|
||||
if (property->GetOption().first == "type" && (tempInt < 0 || tempInt >= PT_NUM || !sim->elements[tempInt].Enabled))
|
||||
{
|
||||
new ErrorMessage("Could not set property", "Invalid Particle Type");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user