Bug in Cell::_preDestroy().

* Bug: In Hurricane, in Cell::_preDestroy(), the classic mistake again:
    do not iterate over a collection while deleting it's elements.
    Now should be safe.
* Change: In CRL Core, set the default display style to "Alliance.Classic [black]"
    (my favorite).
This commit is contained in:
Jean-Paul Chaput 2016-02-23 17:19:42 +01:00
parent f28daec401
commit b57c81dda8
3 changed files with 13 additions and 10 deletions

View File

@ -8,7 +8,7 @@ else:
poly2Color = 'Orange'
defaultStyle = 'Printer.Coriolis'
defaultStyle = 'Alliance.Classic [black]'
stylesTable = \
( ( (Style , 'Alliance.Coriolis [black]', 'Alliance Coriolis Look - black background')

View File

@ -936,15 +936,18 @@ void Cell::_preDestroy()
_slaveEntityMap.begin()->second->destroy();
}
//for ( View* view : getViews() ) view->setCell( NULL );
for ( Marker* marker : getMarkers() ) marker->destroy();
for ( Instance* slaveInstance : getSlaveInstances() ) slaveInstance->destroy();
for ( Instance* instance : getInstances() ) instance->destroy();
for ( Net* net : getNets() ) {
Markers markers = getMarkers (); while ( markers .getFirst() ) markers .getFirst()->destroy();
Instances instances = getSlaveInstances(); while ( instances.getFirst() ) instances.getFirst()->destroy();
instances = getInstances (); while ( instances.getFirst() ) instances.getFirst()->destroy();
Nets nets = getNets();
while ( nets.getFirst() ) {
Net* net = nets.getFirst();
net->_getMainName().detachAll();
net->destroy();
}
for ( auto islave : _netAliasSet ) delete islave;
for ( auto islave : _netAliasSet ) delete islave;
for ( Slice* slice : getSlices() ) slice->_destroy();
while ( not _extensionSlices.empty() ) _removeSlice( _extensionSlices.begin()->second );

View File

@ -1399,16 +1399,16 @@ extern "C" {
# define HCATCH \
} \
catch ( Warning& w ) { \
catch ( const Warning& w ) { \
std::string message = "\n" + getString(w); \
PyErr_Warn ( HurricaneWarning, const_cast<char*>(message.c_str()) ); \
} \
catch ( Error& e ) { \
catch ( const Error& e ) { \
std::string message = "\n" + getString(e); \
PyErr_SetString ( HurricaneError, message.c_str() ); \
return NULL; \
} \
catch ( std::exception& e ) { \
catch ( const std::exception& e ) { \
std::string message = "\n" + std::string(e.what()); \
PyErr_SetString ( HurricaneError, message.c_str() ); \
return NULL; \