Skip to content

Commit bc40ab6

Browse files
committed
Merge pull request #1288 from simonsonc/qvariant-qcolor
Use QColor instead of Qt::GlobalColor in item data
2 parents 2b3108f + 6ebd9a8 commit bc40ab6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gui/raster/qgsrasterhistogramwidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ void QgsRasterHistogramWidget::refreshHistogram()
353353
if ( i == myGrayBand )
354354
{
355355
mHistoColors << Qt::darkGray;
356-
cboHistoBand->setItemData( i - 1, Qt::darkGray, Qt::ForegroundRole );
356+
cboHistoBand->setItemData( i - 1, QColor( Qt::darkGray ), Qt::ForegroundRole );
357357
}
358358
else
359359
{
@@ -366,7 +366,7 @@ void QgsRasterHistogramWidget::refreshHistogram()
366366
{
367367
mHistoColors << Qt::black;
368368
}
369-
cboHistoBand->setItemData( i - 1, Qt::black, Qt::ForegroundRole );
369+
cboHistoBand->setItemData( i - 1, QColor( Qt::black ), Qt::ForegroundRole );
370370
}
371371
}
372372
}
@@ -399,7 +399,7 @@ void QgsRasterHistogramWidget::refreshHistogram()
399399
{
400400
myColor = Qt::black;
401401
}
402-
cboHistoBand->setItemData( i - 1, Qt::black, Qt::ForegroundRole );
402+
cboHistoBand->setItemData( i - 1, QColor( Qt::black ), Qt::ForegroundRole );
403403
}
404404
if ( i == myRedBand || i == myGreenBand || i == myBlueBand )
405405
{

0 commit comments

Comments
 (0)