int nbSel = selected.Extent();
if (nbSel != 1) {
SUIT_MessageBox::warning(desktop(),
- tr("SMESH_WRN_WARNING"),
- tr("SMESH_WRN_NO_AVAILABLE_DATA"));
+ tr("SMESH_WRN_WARNING"),
+ tr("SMESH_WRN_NO_AVAILABLE_DATA"));
onCancel();
return;
}
myMesh = SMESH::GetMeshByIO(myIObject);
if (myMesh->_is_nil()) {
SUIT_MessageBox::warning(desktop(),
- tr("SMESH_WRN_WARNING"),
- tr("SMESH_WRN_NO_AVAILABLE_DATA"));
+ tr("SMESH_WRN_WARNING"),
+ tr("SMESH_WRN_NO_AVAILABLE_DATA"));
onCancel();
return;
}
LightApp_SelectionMgr *Sel = selectionMgr();
if ( Sel )
{
- SALOME_ListIO selected;
- selected.Append( myIObject );
- Sel->setSelectedObjects( selected );
+ SALOME_ListIO selected;
+ selected.Append( myIObject );
+ Sel->setSelectedObjects( selected );
}
}
}
}
void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
- const bool theNoCompError,
- SMESH::compute_error_array_var& theCompErrors,
- const bool theNoHypoError,
- const QString& theHypErrors )
+ const bool theNoCompError,
+ SMESH::compute_error_array_var& theCompErrors,
+ const bool theNoHypoError,
+ const QString& theHypErrors )
{
bool hasShape = myMesh->HasShapeToMesh();
SMESHGUI_ComputeDlg* aCompDlg = computeDlg();
{
SMESH::ComputeError & err = theCompErrors[ row ];
- QString text = err.algoName.in();
- if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_ALGO )->setText( text );
+ QString text = err.algoName.in();
+ if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_ALGO )->setText( text );
- text = SMESH::errorText( err.code, err.comment.in() );
- if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_ERROR )->setText( text );
+ text = SMESH::errorText( err.code, err.comment.in() );
+ if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_ERROR )->setText( text );
- text = QString("%1").arg( err.subShapeID );
- if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_SHAPEID )->setText( text );
+ text = QString("%1").arg( err.subShapeID );
+ if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_SHAPEID )->setText( text );
text = hasShape ? SMESH::shapeText( err.subShapeID, myMainShape ) : QString("");
- if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_SHAPE )->setText( text );
+ if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_SHAPE )->setText( text );
text = ( !hasShape || SMESH::getSubShapeSO( err.subShapeID, myMainShape )) ? "PUBLISHED" : "";
- if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
+ if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
text = err.hasBadMesh ? "hasBadMesh" : "";
- if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_BAD_MESH )->setText( text );
+ if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_BAD_MESH )->setText( text );
if ( err.hasBadMesh ) hasBadMesh = true;
//tbl->item( row, COL_ERROR )->setWordWrap( true ); // VSR: TODO ???
default: break;
}
if ( !algo->_is_nil() )
- theModeMap[ dim ] = 0;
+ theModeMap[ dim ] = 0;
}
}
}
myPreviewDisplayer->SetData( previewRes );
// append shape indeces with computed mesh entities
for ( int i = 0, n = aShapesId->length(); i < n; i++ )
- myMapShapeId[ aShapesId[ i ] ] = 0;
+ myMapShapeId[ aShapesId[ i ] ] = 0;
}
else
myPreviewDisplayer->SetVisibility(false);
// SHOW RESULTS
if ( isShowResultDlg )
showEvaluateResult( aRes, memoryLack, noCompError, aCompErrors,
- noHypoError, aHypErrors);
+ noHypoError, aHypErrors);
}
void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
- const bool theMemoryLack,
- const bool theNoCompError,
- SMESH::compute_error_array_var& theCompErrors,
- const bool theNoHypoError,
- const QString& theHypErrors)
+ const bool theMemoryLack,
+ const bool theNoCompError,
+ SMESH::compute_error_array_var& theCompErrors,
+ const bool theNoHypoError,
+ const QString& theHypErrors)
{
bool hasShape = myMesh->HasShapeToMesh();
SMESHGUI_ComputeDlg* aCompDlg = evaluateDlg();
{
SMESH::ComputeError & err = theCompErrors[ row ];
- QString text = err.algoName.in();
- if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_ALGO )->setText( text );
+ QString text = err.algoName.in();
+ if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_ALGO )->setText( text );
- text = SMESH::errorText( err.code, err.comment.in() );
- if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_ERROR )->setText( text );
+ text = SMESH::errorText( err.code, err.comment.in() );
+ if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_ERROR )->setText( text );
- text = QString("%1").arg( err.subShapeID );
- if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_SHAPEID )->setText( text );
+ text = QString("%1").arg( err.subShapeID );
+ if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_SHAPEID )->setText( text );
text = hasShape ? SMESH::shapeText( err.subShapeID, myMainShape ) : QString("");
- if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_SHAPE )->setText( text );
+ if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_SHAPE )->setText( text );
text = ( !hasShape || SMESH::getSubShapeSO( err.subShapeID, myMainShape )) ? "PUBLISHED" : "";
- if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
+ if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
text = err.hasBadMesh ? "hasBadMesh" : "";
- if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
- else tbl->item( row, COL_BAD_MESH )->setText( text );
+ if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
+ else tbl->item( row, COL_BAD_MESH )->setText( text );
if ( err.hasBadMesh ) hasBadMesh = true;
//tbl->item( row, COL_ERROR )->setWordWrap( true ); // VSR: TODO ???