From 14fc167a5302d96f900352c52688462298b0d4c0 Mon Sep 17 00:00:00 2001 From: imn Date: Fri, 11 Jul 2014 11:38:52 +0400 Subject: [PATCH] Fixed Salome crashed after close application with opened "Add Quadratic element" --- .../SMESHGUI_AddQuadraticElementDlg.cxx | 48 +++++++++---------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index 31a6214dc..94819e6ce 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -933,41 +933,37 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument() QString aCurrentEntry = myEntry; + // clear + myActor = 0; if ( myCurrentLineEdit ) - { - // clear - myActor = 0; - myCurrentLineEdit->setText(""); - if (!GroupButtons->isEnabled()) // inactive - return; - - mySimulation->SetVisibility(false); - - // get selected mesh - SALOME_ListIO aList; - mySelectionMgr->selectedObjects(aList); + if (!GroupButtons->isEnabled()) // inactive + return; - if (aList.Extent() != 1) - { - UpdateTable(); - updateButtons(); - return; - } + mySimulation->SetVisibility(false); - Handle(SALOME_InteractiveObject) anIO = aList.First(); - myEntry = anIO->getEntry(); - myMesh = SMESH::GetMeshByIO(anIO); - if (myMesh->_is_nil()) { - updateButtons(); - return; - } + // get selected mesh + SALOME_ListIO aList; + mySelectionMgr->selectedObjects(aList); - myActor = SMESH::FindActorByEntry(anIO->getEntry()); + if (aList.Extent() != 1) + { + UpdateTable(); + updateButtons(); + return; + } + Handle(SALOME_InteractiveObject) anIO = aList.First(); + myEntry = anIO->getEntry(); + myMesh = SMESH::GetMeshByIO(anIO); + if (myMesh->_is_nil()) { + updateButtons(); + return; } + myActor = SMESH::FindActorByEntry(anIO->getEntry()); + // process groups if ( !myMesh->_is_nil() && myEntry != aCurrentEntry ) { SMESH::ElementType anElementType; -- 2.39.2