Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCKGUI / HEXABLOCKGUI_DocumentSelectionModel.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 5970f85..7939d43
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -326,8 +326,8 @@ void PatternDataSelectionModel::highlightTreeItems(QModelIndexList& indexes,
     {
         if (anItemIndex.isValid())
         {
-            theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole);
-            theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole);
+            theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole);
+            theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole);
             currentHighlightedItems << anItemIndex;
         }
     }
@@ -350,8 +350,8 @@ void PatternDataSelectionModel::unhighlightTreeItems(bool clearSelected)
     {
         if (anItemIndex.isValid())
         {
-            theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole);
-            theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole);
+            theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole);
+            theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole);
         }
     }
     currentHighlightedItems.clear();
@@ -591,8 +591,8 @@ void PatternGeomSelectionModel::highlightTreeItems(QModelIndexList& indexes,
     {
         if (anItemIndex.isValid())
         {
-            theModel->setData(anItemIndex, fgColor, Qt::ForegroundRole);
-            theModel->setData(anItemIndex, bgColor, Qt::BackgroundRole);
+            theModel->setData(anItemIndex, QColor(fgColor), Qt::ForegroundRole);
+            theModel->setData(anItemIndex, QColor(bgColor), Qt::BackgroundRole);
             currentHighlightedItems << anItemIndex;
         }
     }
@@ -614,8 +614,8 @@ void PatternGeomSelectionModel::unhighlightTreeItems(bool clearSelected)
     {
         if (anItemIndex.isValid())
         {
-            theModel->setData(anItemIndex, Qt::darkGreen, Qt::ForegroundRole);
-            theModel->setData(anItemIndex, Qt::white, Qt::BackgroundRole);
+            theModel->setData(anItemIndex, QColor(Qt::darkGreen), Qt::ForegroundRole);
+            theModel->setData(anItemIndex, QColor(Qt::white), Qt::BackgroundRole);
         }
     }
     currentHighlightedItems.clear();