+ force3d = myDlg->IsMediumNdsOnGeom();
+ bool theToBiQuad = myDlg->IsBiQuadratic();
+ if ( sourceMesh->_is_nil() ) {
+ if ( theToBiQuad ) aEditor->ConvertToBiQuadratic ( force3d, idSource );
+ else aEditor->ConvertToQuadraticObject( force3d, idSource );
+ }
+ else {
+ if ( theToBiQuad ) aEditor->ConvertToBiQuadratic( force3d, sourceMesh );
+ else aEditor->ConvertToQuadratic ( force3d );
+ }
+ if ( !force3d )
+ {
+ SMESH::ComputeError_var error = aEditor->GetLastError();
+ if ( error->hasBadMesh )
+ {
+ if ( myBadElemsPreview ) delete myBadElemsPreview; // viewWindow may change
+ myBadElemsPreview = new SMESHGUI_MeshEditPreview( viewWindow() );
+
+ double aPointSize = SMESH::GetFloat("SMESH:node_size",3);
+ double aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
+ vtkProperty* prop = vtkProperty::New();
+ prop->SetLineWidth( aLineWidth * 3 );
+ prop->SetPointSize( aPointSize * 3 );
+ prop->SetColor( 250, 0, 250 );
+ myBadElemsPreview->GetActor()->SetProperty( prop );
+ prop->Delete();
+
+ SMESH::MeshPreviewStruct_var previewData = aEditor->GetPreviewData();
+ myBadElemsPreview->SetData( & previewData.in() );
+ myBadElemsPreview->SetVisibility(true);
+
+ SUIT_MessageBox* mb = new SUIT_MessageBox(SUIT_MessageBox::Warning,
+ tr( "SMESH_WRN_WARNING" ),
+ tr("EDITERR_NO_MEDIUM_ON_GEOM"),
+ SUIT_MessageBox::Ok, myDlg);
+ mb->setWindowModality( Qt::NonModal );
+ mb->setAttribute( Qt::WA_DeleteOnClose );
+ mb->show();
+ connect ( mb, SIGNAL( finished(int) ), this, SLOT( onWarningWinFinished() ));
+ //connect ( mb, SIGNAL( rejected() ), this, SLOT( onWarningWinFinished() ));
+ }
+ }