Bug: In EtesianEngine::toColoquinte(), check for placed AB before setting it.

This commit is contained in:
Jean-Paul Chaput 2016-12-05 11:47:42 +01:00
parent d86527d384
commit 184cf77d0f
1 changed files with 9 additions and 9 deletions

View File

@ -467,6 +467,15 @@ namespace Etesian {
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
Cell* masterCell = instance->getMasterCell();
if (not masterCell->getAbutmentBox().isEmpty()
and ( (instance->getPlacementStatus() != Instance::PlacementStatus::PLACED)
or (instance->getPlacementStatus() != Instance::PlacementStatus::FIXED ) ) ) {
throw Error( "EtesianEngine::toColoquinte(): Non-leaf instance \"%s\" of \"%s\" has an abutment box but is *not* placed."
, getString(instance ->getName()).c_str()
, getString(masterCell->getName()).c_str()
);
}
if ( masterCell->getAbutmentBox().isEmpty()
or ( (masterCell->getAbutmentBox().getHeight() == topAb.getHeight())
and (masterCell->getAbutmentBox().getWidth () == topAb.getWidth ()) ) ) {
@ -477,15 +486,6 @@ namespace Etesian {
occurrence.makeInvalid();
instance->slaveAbutmentBox();
}
if (not masterCell->getAbutmentBox().isEmpty()
and ( (instance->getPlacementStatus() != Instance::PlacementStatus::PLACED)
or (instance->getPlacementStatus() != Instance::PlacementStatus::FIXED ) ) ) {
throw Error( "EtesianEngine::toColoquinte(): Non-leaf instance \"%s\" of \"%s\" has an abutment box but is *not* placed."
, getString(instance ->getName()).c_str()
, getString(masterCell->getName()).c_str()
);
}
}
UpdateSession::close();