mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 12:30:32 +05:00
Fix for the bug IPAL22857: "Find element by point problems"
This commit is contained in:
parent
cfddf61e77
commit
4d706076ff
@ -453,9 +453,6 @@ void SMESHGUI_FindElemByPointOp::onSelectionDone()
|
|||||||
if ( !myMeshIO.IsNull() && myMeshIO->hasEntry() )
|
if ( !myMeshIO.IsNull() && myMeshIO->hasEntry() )
|
||||||
oldMeshEntry = myMeshIO->getEntry();
|
oldMeshEntry = myMeshIO->getEntry();
|
||||||
|
|
||||||
myDlg->myMeshName->setText("");
|
|
||||||
myMeshIO.Nullify();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SALOME_ListIO aList;
|
SALOME_ListIO aList;
|
||||||
selectionMgr()->selectedObjects(aList, SVTK_Viewer::Type());
|
selectionMgr()->selectedObjects(aList, SVTK_Viewer::Type());
|
||||||
@ -464,13 +461,16 @@ void SMESHGUI_FindElemByPointOp::onSelectionDone()
|
|||||||
Handle(SALOME_InteractiveObject) anIO = aList.First();
|
Handle(SALOME_InteractiveObject) anIO = aList.First();
|
||||||
_PTR(SObject) pObj = studyDS()->FindObjectID(anIO->getEntry());
|
_PTR(SObject) pObj = studyDS()->FindObjectID(anIO->getEntry());
|
||||||
CORBA::Object_var anObj = SMESH::IObjectToObject( anIO );
|
CORBA::Object_var anObj = SMESH::IObjectToObject( anIO );
|
||||||
myMeshOrPart = SMESH::SMESH_IDSource::_narrow(anObj);
|
newMeshEntry = anIO->getEntry();
|
||||||
if ( pObj && !myMeshOrPart->_is_nil() )
|
SMESH::SMESH_IDSource_var aMeshOrPart = SMESH::SMESH_IDSource::_narrow(anObj);
|
||||||
|
if ( pObj && !aMeshOrPart->_is_nil() && oldMeshEntry != newMeshEntry )
|
||||||
{
|
{
|
||||||
|
myMeshOrPart = aMeshOrPart;
|
||||||
|
myMeshIO.Nullify();
|
||||||
myMeshIO = anIO;
|
myMeshIO = anIO;
|
||||||
std::string name = pObj->GetName();
|
std::string name = pObj->GetName();
|
||||||
|
myDlg->myMeshName->setText("");
|
||||||
myDlg->myMeshName->setText( QString( name.c_str() ).trimmed() );
|
myDlg->myMeshName->setText( QString( name.c_str() ).trimmed() );
|
||||||
newMeshEntry = anIO->getEntry();
|
|
||||||
SMESH::array_of_ElementType_var types = myMeshOrPart->GetTypes();
|
SMESH::array_of_ElementType_var types = myMeshOrPart->GetTypes();
|
||||||
myDlg->setTypes( types );
|
myDlg->setTypes( types );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user