+ if ( (aCriterionType != SMESH::FT_GroupColor && clrBtn) ||
+ (aCriterionType != SMESH::FT_ElemGeomType && isComboItem) ||
+ (aCriterionType != SMESH::FT_MultiConnection && isIntSpinItem) ||
+ (!anIsDoubleCriterion && isDoubleSpinItem) ||
+ anIsPrecisionChanged )
+ {
+ bool isSignalsBlocked = aTable->signalsBlocked();
+ aTable->blockSignals( true );
+ aTable->removeCellWidget( row, 2 );
+ aTable->setItem( row, 2, new QTableWidgetItem() );
+ aTable->blockSignals( isSignalsBlocked );
+ }
+ if ( (aCriterionType == SMESH::FT_GroupColor && !clrBtn) ||
+ (aCriterionType == SMESH::FT_ElemGeomType && !isComboItem) ||
+ (aCriterionType == SMESH::FT_MultiConnection && !isIntSpinItem) ||
+ (anIsDoubleCriterion && !isDoubleSpinItem) ||
+ anIsPrecisionChanged )
+ {
+ bool isSignalsBlocked = aTable->signalsBlocked();
+ aTable->blockSignals( true );
+ if ( aCriterionType == SMESH::FT_GroupColor )
+ aTable->setCellWidget( row, 2, new QtxColorButton( aTable ) );
+ else if ( aCriterionType == SMESH::FT_ElemGeomType ) {
+ QList<int> typeIds = geomTypes( aType );
+ QMap<int, QString> typeNames;
+ QList<int>::const_iterator anIter = typeIds.begin();
+ for ( int i = 0; anIter != typeIds.end(); ++anIter, ++i)
+ {
+ QString typeKey = QString( "GEOM_TYPE_%1" ).arg( *anIter );
+ typeNames[ *anIter ] = tr( typeKey.toLatin1().data() );
+ }
+ ComboItem* typeBox = new ComboItem( typeNames );
+ aTable->setItem( row, 2, typeBox );
+ }
+ else if ( aCriterionType == SMESH::FT_MultiConnection ) {
+ IntSpinItem* intSpin = new IntSpinItem( 0 );
+ aTable->setItem( row, 2, intSpin );
+ }
+ else if ( anIsDoubleCriterion ) {
+ DoubleSpinItem* dblSpin = new DoubleSpinItem( 0 );
+ dblSpin->setPrecision( aPrecision );
+ aTable->setItem( row, 2, dblSpin );
+ }
+ aTable->blockSignals( isSignalsBlocked );
+ }
+
+ if ((aType == SMESH::NODE && (aCriterionType == SMESH::FT_FreeNodes ||
+ aCriterionType == SMESH::FT_EqualNodes )) ||
+ (aType == SMESH::EDGE && (aCriterionType == SMESH::FT_FreeBorders ||
+ aCriterionType == SMESH::FT_EqualEdges )) ||
+ (aType == SMESH::FACE && (aCriterionType == SMESH::FT_BareBorderFace ||
+ aCriterionType == SMESH::FT_OverConstrainedFace ||
+ aCriterionType == SMESH::FT_FreeEdges ||
+ aCriterionType == SMESH::FT_FreeFaces ||
+ aCriterionType == SMESH::FT_EqualFaces)) ||
+ (aType == SMESH::VOLUME && (aCriterionType == SMESH::FT_BadOrientedVolume ||
+ aCriterionType == SMESH::FT_OverConstrainedVolume ||
+ aCriterionType == SMESH::FT_BareBorderVolume ||
+ aCriterionType == SMESH::FT_EqualVolumes )) ||
+ aCriterionType == SMESH::FT_LinearOrQuadratic ||
+ aCriterionType == SMESH::FT_GroupColor ||
+ aCriterionType == SMESH::FT_ElemGeomType ||
+ aCriterionType == SMESH::FT_CoplanarFaces
+ )
+ {
+ bool isSignalsBlocked = aTable->signalsBlocked();
+ aTable->blockSignals( true );
+
+ if (aCompareItem->count() > 0)
+ aCompareItem->clear();
+ aTable->setEditable(false, row, 1);
+ aTable->item(row, 2)->setText( QString("") );
+ aTable->setEditable(aCriterionType == SMESH::FT_GroupColor ||
+ aCriterionType == SMESH::FT_ElemGeomType ||
+ aCriterionType == SMESH::FT_CoplanarFaces, row, 2);
+ aTable->blockSignals( isSignalsBlocked );
+ }
+ else if (aCriterionType == SMESH::FT_RangeOfIds ||
+ aCriterionType == SMESH::FT_BelongToGeom ||
+ aCriterionType == SMESH::FT_BelongToPlane ||
+ aCriterionType == SMESH::FT_BelongToCylinder ||
+ aCriterionType == SMESH::FT_BelongToGenSurface ||
+ aCriterionType == SMESH::FT_LyingOnGeom)