mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Fix crash at study closing. Enable canceling Prism 3D computation
This commit is contained in:
parent
a3ee66b037
commit
f3ce9fcd40
@ -74,12 +74,20 @@ public:
|
|||||||
void DeleteAll()
|
void DeleteAll()
|
||||||
{
|
{
|
||||||
for ( size_t i = 0; i < myVec.size(); ++i )
|
for ( size_t i = 0; i < myVec.size(); ++i )
|
||||||
delete myVec[i];
|
if ( SUBMESH* sm = myVec[i] )
|
||||||
|
{
|
||||||
|
myVec[i] = 0; // avoid access via Get(i)
|
||||||
|
delete sm;
|
||||||
|
}
|
||||||
myVec.clear();
|
myVec.clear();
|
||||||
|
|
||||||
typename std::map< int, SUBMESH* >::iterator i2sm = myMap.begin();
|
typename std::map< int, SUBMESH* >::iterator i2sm = myMap.begin();
|
||||||
for ( ; i2sm != myMap.end(); ++i2sm )
|
for ( ; i2sm != myMap.end(); ++i2sm )
|
||||||
delete i2sm->second;
|
if ( SUBMESH* sm = i2sm->second )
|
||||||
|
{
|
||||||
|
i2sm->second = 0; // avoid access via Get(i)
|
||||||
|
delete sm;
|
||||||
|
}
|
||||||
myMap.clear();
|
myMap.clear();
|
||||||
}
|
}
|
||||||
int GetMinID() const
|
int GetMinID() const
|
||||||
|
@ -1203,6 +1203,9 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism)
|
|||||||
// create a node
|
// create a node
|
||||||
node = meshDS->AddNode( coords.X(), coords.Y(), coords.Z() );
|
node = meshDS->AddNode( coords.X(), coords.Y(), coords.Z() );
|
||||||
meshDS->SetNodeInVolume( node, volumeID );
|
meshDS->SetNodeInVolume( node, volumeID );
|
||||||
|
|
||||||
|
if ( _computeCanceled )
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
} // loop on bottom nodes
|
} // loop on bottom nodes
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user