Skip to content

Commit 0bc3fb9

Browse files
[GUI.Qt] Fix invalid color of the warning sign on object (#5190)
Fix invalid color of the warning sign on object.
1 parent b5c1f17 commit 0bc3fb9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sofa/GUI/Qt/src/sofa/gui/qt/GraphListenerQListView.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ QPixmap* getPixmap(core::objectmodel::Base* obj, bool haveInfo, bool haveWarning
154154
if(haveErrors)
155155
flags |= 1 << (4) ;
156156

157-
158157
static std::map<unsigned int, QPixmap*> pixmaps;
159158
if (!pixmaps.count(flags))
160159
{
@@ -236,10 +235,10 @@ QPixmap* getPixmap(core::objectmodel::Base* obj, bool haveInfo, bool haveWarning
236235
flags |= 1 << (ALLCOLORS+1) ;
237236

238237
if(haveWarning)
239-
flags |= 1 << (ALLCOLORS+1) ;
238+
flags |= 1 << (ALLCOLORS+2) ;
240239

241240
if(haveErrors)
242-
flags |= 1 << (ALLCOLORS+1) ;
241+
flags |= 1 << (ALLCOLORS+3) ;
243242

244243
static std::map<unsigned int, QPixmap*> pixmaps;
245244
if (!pixmaps.count(flags))
@@ -249,10 +248,8 @@ QPixmap* getPixmap(core::objectmodel::Base* obj, bool haveInfo, bool haveWarning
249248
if (flags & (1<<i))
250249
++nc;
251250
const int nx = 2+iconWidth*nc+iconMargin;
252-
//QImage * img = new QImage(nx,iconHeight,32);
253251
QImage * img = new QImage(nx,iconHeight,QImage::Format_ARGB32);
254252

255-
//img->setAlphaBuffer(true);
256253
img->fill(qRgba(0,0,0,0));
257254
// Workaround for qt 3.x where fill() does not set the alpha channel
258255
for (int y=0 ; y < iconHeight ; y++)

0 commit comments

Comments
 (0)