mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
also check .Enabled in PROP
This commit is contained in:
@@ -139,7 +139,7 @@ void PropertyWindow::SetProperty()
|
|||||||
buffer.exceptions(std::stringstream::failbit | std::stringstream::badbit);
|
buffer.exceptions(std::stringstream::failbit | std::stringstream::badbit);
|
||||||
buffer >> tempInt;
|
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");
|
new ErrorMessage("Could not set property", "Invalid Particle Type");
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user