Fix Calc
This commit is contained in:
parent
2e98224be7
commit
b86d8122fc
File diff suppressed because one or more lines are too long
@ -145,17 +145,25 @@ class Valid
|
||||
|
||||
}
|
||||
|
||||
if(count($option->getEdgesCollectionContainer()) > 0) {
|
||||
$option->setIsValid(false);
|
||||
}
|
||||
$mainEdges = true;
|
||||
|
||||
/** @var EdgeCollection $collection */
|
||||
foreach($option->getEdgesCollectionContainer() as $collection) {
|
||||
/** @var Edge $edge */
|
||||
$collValid = false;
|
||||
foreach($collection as $edge) {
|
||||
if($this->edgeIsValid($collection->getName(), $edge)) {
|
||||
$option->setIsValid(true);
|
||||
if(!$collValid && $this->edgeIsValid($collection->getName(), $edge)) {
|
||||
$collValid = true;
|
||||
}
|
||||
}
|
||||
if(!$collValid) {
|
||||
$mainEdges = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$mainEdges && $option->isValid()) {
|
||||
$option->setIsValid(false);
|
||||
}
|
||||
|
||||
$this->engine->setVariables($option->parseAdditionalValues($this->engine->getVariables()));
|
||||
|
||||
@ -109,4 +109,9 @@ class Opt
|
||||
{
|
||||
$this->isSelected = $isSelected;
|
||||
}
|
||||
|
||||
public function clearEdgesCollectionContainer()
|
||||
{
|
||||
$this->edgesCollectionContainer = new EdgeCollectionContainer();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user