From 19bdba0fcb826f577cf3452668a8c5909c5e69e6 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Wed, 10 Jan 2018 17:46:11 +0100 Subject: [PATCH] Working aspect ratio and feed cell loading in Etesian. * Bug: In Etesian::setDefaultAb(), the abutment box was miscalculated, it was always square. * Bug: In Etesian::_postCreate(), improper loading of filler cells. Now we first try to find in memory (DataBase::getCell()) and if not found try to use the AllianceFramework loader. This is not a clean strategy. We should have something more clear. --- etesian/src/EtesianEngine.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 32456796..cf16728c 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -279,17 +279,26 @@ namespace Etesian { while ( not feedNames.empty() ) { size_t cut = feedNames.find( separator ); + string feedName; if (cut != string::npos) { - _feedCells.useFeed( DataBase::getDB()->getCell( feedNames.substr(0,cut) ) ); + feedName = feedNames.substr( 0, cut ); feedNames = feedNames.substr( cut+1 ); } else { - _feedCells.useFeed( AllianceFramework::get()->getCell( feedNames, Catalog::State::Views|Catalog::State::Foreign ) ); + feedName = feedNames; feedNames.clear(); } + + Cell* feed = DataBase::getDB()->getCell( feedName ); + if (not feed) + feed = AllianceFramework::get()->getCell( feedName, Catalog::State::Views|Catalog::State::Foreign ); + + if (feed) + _feedCells.useFeed( feed ); + else + cerr << Warning( "EtesianEngine::_postCreate() Unable to find \"%s\" feed cell." + , feedName.c_str() + ) << endl; } - - //_feedCells.useFeed( AllianceFramework::get()->getCell("tie_x0" ,Catalog::State::Views) ); - //_feedCells.useFeed( AllianceFramework::get()->getCell("rowend_x0",Catalog::State::Views) ); } } @@ -375,7 +384,7 @@ namespace Etesian { static_cast(ioccurrence.getEntity())->destroy(); } - DbU::Unit abWidth = rows*getSliceHeight(); + DbU::Unit abWidth = columns*getSliceHeight(); DbU::Unit adjust = abWidth % getVerticalPitch(); if (adjust) abWidth += getVerticalPitch() - adjust;