mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-31 03:40:34 +05:00
Qt4 porting: the filter is editable, but should not be (MESH-026 GUI test scenario)
This commit is contained in:
parent
d5860b4fde
commit
90f96fce55
@ -1691,6 +1691,21 @@ void SMESHGUI_FilterTable::SetEditable (const bool isEditable)
|
|||||||
{
|
{
|
||||||
anIter.value()->setReadOnly(!isEditable);
|
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)
|
if (isEditable)
|
||||||
{
|
{
|
||||||
myAddBtn->show();
|
myAddBtn->show();
|
||||||
|
@ -854,6 +854,7 @@ void SMESHGUI_FilterLibraryDlg::onFilterChanged()
|
|||||||
myTable->AddCriterion(aCriteria[ i ], myTable->GetType());
|
myTable->AddCriterion(aCriteria[ i ], myTable->GetType());
|
||||||
|
|
||||||
myTable->Update();
|
myTable->Update();
|
||||||
|
updateControlsVisibility(); // IPAL19974
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user