Salome HOME
Merge branch 'master' into V7_5_BR
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_AddMeshElementDlg.cxx
index 7c430493d524c6fd0b40abb715d0a95aad225f3a..cbc584da5a2d85f976b4b9ad0188877b800dee6c 100644 (file)
@@ -230,7 +230,7 @@ namespace SMESH
       for (int i = 0, iEnd = theIds.size(); i < iEnd; i++){
         anIds->InsertId(0,theIds[i]);
         vtkIdType anId = myBallPolyData->InsertNextCell(VTK_POLY_VERTEX,anIds);
-        double d = theDiameter;
+        double d = theDiameter * theActor->GetBallScale();
         aScalars->SetTuple(anId,&d);
         anIds->Reset();
       }
@@ -586,6 +586,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
     SMESH::long_array_var anIdList = new SMESH::long_array;
     anIdList->length( 1 );
     anIdList[0] = -1;
+    const bool onlyNodesInMesh = ( myMesh->NbElements() == 0 );
 
     switch (myElementType) {
     case SMDSAbs_0DElement:
@@ -645,8 +646,10 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
     mySelectionMgr->setSelectedObjects( aList, false );
 
     mySimulation->SetVisibility(false);
+    if ( onlyNodesInMesh )
+      myActor->SetRepresentation( SMESH_Actor::eEdge ); // wireframe
     SMESH::UpdateView();
-    
+
     buttonOk->setEnabled(false);
     buttonApply->setEnabled(false);