Salome HOME
Fixed Salome crashed after close application with opened "Add Quadratic element"
authorimn <imn@opencascade.com>
Fri, 11 Jul 2014 07:38:52 +0000 (11:38 +0400)
committerimn <imn@opencascade.com>
Wed, 16 Jul 2014 12:43:19 +0000 (16:43 +0400)
src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx

index 31a6214dc95fe7eb5bb8430e22af1aff7d0068a5..94819e6cebac9dc8511d130e7d7a3821b6ee0b2c 100644 (file)
@@ -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;