if (aCompareItem->count() > 0)
aCompareItem->clear();
+ aTable->setEditable(false, row, 1);
aTable->setEditable(false, row, 2);
aTable->blockSignals( isSignalsBlocked );
QMap<int, QString> aMap;
aMap[ SMESH::FT_EqualTo ] = tr("EQUAL_TO");
aCompareItem->setItems(aMap);
+ if (!aTable->isEditable(row, 2))
+ aTable->setEditable(true, row, 1);
if (!aTable->isEditable(row, 2))
aTable->setEditable(true, row, 2);
}
bool isOk = false;
aText.toDouble(&isOk);
aTable->item( row, 2 )->setText(isOk ? aText : QString(""));
+ if (!aTable->isEditable(row, 1))
+ aTable->setEditable(true, row, 1);
if (!aTable->isEditable(row, 2))
aTable->setEditable(true, row, 2);
}
{
anIter.value()->setReadOnly(!isEditable);
+ // Set Flags for CheckItems directly IPAL 19974
+ Table* aTable = anIter.value();
+ for (int i = 0, n = aTable->rowCount(); i < n; i++)
+ for (int j = 0, m = aTable->columnCount(); j < m; j++)
+ {
+ QTableWidgetItem* anItem = aTable->item(i, j);
+ if ( dynamic_cast<SMESHGUI_FilterTable::CheckItem*>( anItem ) ) {
+ Qt::ItemFlags f = anItem->flags();
+ if (!isEditable) f = f & ~Qt::ItemIsUserCheckable;
+ else f = f | Qt::ItemIsUserCheckable;
+ anItem->setFlags( f );
+ }
+ }
+ //end of IPAL19974
+
if (isEditable)
{
myAddBtn->show();
aLay->setMargin(MARGIN);
aLay->setSpacing(SPACING);
- myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_OK" ), aGrp);
- myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp);
- myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp);
- myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp);
- myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp);
+ myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp);
+ myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp);
+ myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp);
+ myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp);
+ myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp);
aLay->addWidget(myButtons[ BTN_OK ]);
aLay->addSpacing(10);
// name : SMESHGUI_FilterDlg::SetGroupIds
// Purpose : Set mesh
//=======================================================================
-void SMESHGUI_FilterDlg::SetMesh (SMESH::SMESH_Mesh_ptr theMesh)
+void SMESHGUI_FilterDlg::SetMesh (SMESH::SMESH_Mesh_var theMesh)
{
myMesh = theMesh;
+ if ( myMesh->_is_nil() ) {
+ myButtons[BTN_OK]->setEnabled(false);
+ myButtons[BTN_Apply]->setEnabled(false);
+ }
}
//=======================================================================
int aRow, aCol;
const SALOME_ListIO& aList = mySelector->StoredIObjects();
+ if ( myMesh->_is_nil() && aList.Extent()>0 ) {
+ myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(aList.First());
+ if ( !(myMesh->_is_nil()) ) {
+ myButtons[BTN_OK]->setEnabled(true);
+ myButtons[BTN_Apply]->setEnabled(true);
+ }
+ }
+
if (aList.Extent() != 1 ||
!myTable->CurrentCell(aRow, aCol) ||
myTable->GetCriterionType(aRow) != SMESH::FT_BelongToGeom &&
}
}
+
//=======================================================================
// name : SMESHGUI_FilterDlg::onCriterionChanged
// Purpose : SLOT called when cretarion of current row changed. Update selection