From 326f2a738ed17f848ee782761cf5b05cf75b127f Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Mon, 6 Jan 2025 14:42:17 +0100 Subject: [PATCH] Fix invalid color of the warning sign on object. --- Sofa/GUI/Qt/src/sofa/gui/qt/GraphListenerQListView.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Sofa/GUI/Qt/src/sofa/gui/qt/GraphListenerQListView.cpp b/Sofa/GUI/Qt/src/sofa/gui/qt/GraphListenerQListView.cpp index 2b529ba25fa..0a57b822880 100644 --- a/Sofa/GUI/Qt/src/sofa/gui/qt/GraphListenerQListView.cpp +++ b/Sofa/GUI/Qt/src/sofa/gui/qt/GraphListenerQListView.cpp @@ -154,7 +154,6 @@ QPixmap* getPixmap(core::objectmodel::Base* obj, bool haveInfo, bool haveWarning if(haveErrors) flags |= 1 << (4) ; - static std::map pixmaps; if (!pixmaps.count(flags)) { @@ -236,10 +235,10 @@ QPixmap* getPixmap(core::objectmodel::Base* obj, bool haveInfo, bool haveWarning flags |= 1 << (ALLCOLORS+1) ; if(haveWarning) - flags |= 1 << (ALLCOLORS+1) ; + flags |= 1 << (ALLCOLORS+2) ; if(haveErrors) - flags |= 1 << (ALLCOLORS+1) ; + flags |= 1 << (ALLCOLORS+3) ; static std::map pixmaps; if (!pixmaps.count(flags)) @@ -249,10 +248,8 @@ QPixmap* getPixmap(core::objectmodel::Base* obj, bool haveInfo, bool haveWarning if (flags & (1<setAlphaBuffer(true); img->fill(qRgba(0,0,0,0)); // Workaround for qt 3.x where fill() does not set the alpha channel for (int y=0 ; y < iconHeight ; y++)