]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Qt4 porting: the filter is editable, but should not be (MESH-026 GUI test scenario)
authordmv <dmv@opencascade.com>
Wed, 8 Oct 2008 11:35:05 +0000 (11:35 +0000)
committerdmv <dmv@opencascade.com>
Wed, 8 Oct 2008 11:35:05 +0000 (11:35 +0000)
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx

index 8de8a1c3461dc61962d77cbfb2647b7f49417694..d0b2c15dd80166144b4b61b6932081536e3c568f 100755 (executable)
@@ -1691,6 +1691,21 @@ void SMESHGUI_FilterTable::SetEditable (const bool 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)
     {
       myAddBtn->show();
index 9a94cb15639a3e8fa9f40d09099f31e80102d75e..90a905dd29713063dc2c2f99d59d140b89bb9db3 100644 (file)
@@ -854,6 +854,7 @@ void SMESHGUI_FilterLibraryDlg::onFilterChanged()
     myTable->AddCriterion(aCriteria[ i ], myTable->GetType());
 
   myTable->Update();
+  updateControlsVisibility(); // IPAL19974
 }
 
 //=======================================================================