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) {
|
$mainEdges = true;
|
||||||
$option->setIsValid(false);
|
|
||||||
}
|
|
||||||
/** @var EdgeCollection $collection */
|
/** @var EdgeCollection $collection */
|
||||||
foreach($option->getEdgesCollectionContainer() as $collection) {
|
foreach($option->getEdgesCollectionContainer() as $collection) {
|
||||||
/** @var Edge $edge */
|
/** @var Edge $edge */
|
||||||
|
$collValid = false;
|
||||||
foreach($collection as $edge) {
|
foreach($collection as $edge) {
|
||||||
if($this->edgeIsValid($collection->getName(), $edge)) {
|
if(!$collValid && $this->edgeIsValid($collection->getName(), $edge)) {
|
||||||
$option->setIsValid(true);
|
$collValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!$collValid) {
|
||||||
|
$mainEdges = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$mainEdges && $option->isValid()) {
|
||||||
|
$option->setIsValid(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->engine->setVariables($option->parseAdditionalValues($this->engine->getVariables()));
|
$this->engine->setVariables($option->parseAdditionalValues($this->engine->getVariables()));
|
||||||
|
|||||||
@ -109,4 +109,9 @@ class Opt
|
|||||||
{
|
{
|
||||||
$this->isSelected = $isSelected;
|
$this->isSelected = $isSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function clearEdgesCollectionContainer()
|
||||||
|
{
|
||||||
|
$this->edgesCollectionContainer = new EdgeCollectionContainer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user