Correct the image snaphot generation (CellImage).
* Change: In CellImage::setScreenCellWidget, fully copy the display settings from the reference widget (not just part of them). * Bug: In CellImage::toImage(), if the abutment box of the displayed cell is not *fully* includer in the viewer area, do *not* try to reframe it. The reframe() method seems to be buggy, works OK just without calling it.
This commit is contained in:
parent
08b951047c
commit
6210d312fe
|
@ -23,6 +23,8 @@
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include "hurricane/configuration/Configuration.h"
|
#include "hurricane/configuration/Configuration.h"
|
||||||
#include "hurricane/DataBase.h"
|
#include "hurricane/DataBase.h"
|
||||||
|
#include "hurricane/Technology.h"
|
||||||
|
#include "hurricane/BasicLayer.h"
|
||||||
#include "hurricane/Cell.h"
|
#include "hurricane/Cell.h"
|
||||||
#include "hurricane/viewer/Graphics.h"
|
#include "hurricane/viewer/Graphics.h"
|
||||||
#include "hurricane/viewer/CellImage.h"
|
#include "hurricane/viewer/CellImage.h"
|
||||||
|
@ -81,11 +83,38 @@ namespace Hurricane {
|
||||||
_screenCellWidget = cellWidget;
|
_screenCellWidget = cellWidget;
|
||||||
|
|
||||||
shared_ptr<CellWidget::State> clone ( _screenCellWidget->getStateClone() );
|
shared_ptr<CellWidget::State> clone ( _screenCellWidget->getStateClone() );
|
||||||
_cellWidget->setState ( clone );
|
_cellWidget->setState( clone );
|
||||||
_cellWidget->setLayerVisible("grid" , _screenCellWidget->isLayerVisible("grid" ));
|
_cellWidget->setPixelThreshold( 5 );
|
||||||
_cellWidget->setLayerVisible("text.instance" , _screenCellWidget->isLayerVisible("text.instance" ));
|
|
||||||
_cellWidget->setLayerVisible("text.component", _screenCellWidget->isLayerVisible("text.component"));
|
array<string,14> labels = {{ string("fallback" )
|
||||||
_cellWidget->setLayerVisible("rubber" , _screenCellWidget->isLayerVisible("rubber" ));
|
, string("rubber" )
|
||||||
|
, string("phantom" )
|
||||||
|
, string("boundaries" )
|
||||||
|
, string("marker" )
|
||||||
|
, string("grid" )
|
||||||
|
, string("spot" )
|
||||||
|
, string("ghost" )
|
||||||
|
, string("text.ruler" )
|
||||||
|
, string("text.cell" )
|
||||||
|
, string("text.instance" )
|
||||||
|
, string("text.components" )
|
||||||
|
, string("text.references" )
|
||||||
|
, string("undef" )
|
||||||
|
}};
|
||||||
|
|
||||||
|
for ( string label : labels )
|
||||||
|
_cellWidget->setLayerVisible( label
|
||||||
|
, _screenCellWidget->isLayerVisible(label) );
|
||||||
|
|
||||||
|
for ( const BasicLayer* layer : DataBase::getDB()->getTechnology()->getBasicLayers() )
|
||||||
|
_cellWidget->setLayerVisible( layer->getName()
|
||||||
|
, _screenCellWidget->isLayerVisible( layer->getName() ));
|
||||||
|
|
||||||
|
_cellWidget->copyDrawExtensionGos( _screenCellWidget );
|
||||||
|
|
||||||
|
for ( ExtensionSlice* extension : cellWidget->getCell()->getExtensionSlices() )
|
||||||
|
_cellWidget->setLayerVisible( extension->getName()
|
||||||
|
, _screenCellWidget->isLayerVisible( extension->getName() ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -159,7 +188,7 @@ namespace Hurricane {
|
||||||
setFitOnAbutmentBox( true );
|
setFitOnAbutmentBox( true );
|
||||||
_cellWidget->fitToContents();
|
_cellWidget->fitToContents();
|
||||||
} else {
|
} else {
|
||||||
_cellWidget->reframe( _screenCellWidget->getVisibleArea() );
|
//_cellWidget->reframe( _screenCellWidget->getVisibleArea() );
|
||||||
}
|
}
|
||||||
|
|
||||||
cerr << " After resize CellWidget: " << _cellWidget->geometry().width() << "x" << _cellWidget->geometry().height() << endl;
|
cerr << " After resize CellWidget: " << _cellWidget->geometry().width() << "x" << _cellWidget->geometry().height() << endl;
|
||||||
|
|
Loading…
Reference in New Issue