X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxTreeView.cpp;h=3a24eb49c714ce34db23bb793f7845ee9cd8bcdb;hb=88745f8677503fa747963f8cd78c52f4b3deb35e;hp=1d5663fd83e02f56263fecc49b48c46927845a85;hpb=db654cb02ce8004024202fbc676bd434a07f8443;p=creaImageIO.git diff --git a/src2/creaImageIOWxTreeView.cpp b/src2/creaImageIOWxTreeView.cpp index 1d5663f..3a24eb4 100644 --- a/src2/creaImageIOWxTreeView.cpp +++ b/src2/creaImageIOWxTreeView.cpp @@ -306,9 +306,7 @@ namespace creaImageIO <<"'"<LoadChildren(*i,1); @@ -342,37 +340,7 @@ namespace creaImageIO int n= GetTreeHandler()->GetNumberOfChildren(*j); oss << n; std::string s(oss.str()); - item.SetText( crea::std2wx(s)); - - //Setting the color according to the parent - if(l==0) - { - item.SetBackgroundColour - (wxColourDatabase().Find - (crea::std2wx(mColorPalette[colorId]))); - mColorMap.insert - (NodeColorPair - (*j,wxColourDatabase().Find - (crea::std2wx(mColorPalette[colorId])))); - if(colorId<64) - { - colorId++; - } - else - { - colorId=0; - } - } - else if(l!=mLevelList.size()-1) - { - item.SetBackgroundColour(mColorMap[*i]); - mColorMap.insert(NodeColorPair(*j,mColorMap[*i])); - } - else - { - item.SetBackgroundColour(mColorMap[*i]); - } - + item.SetText( crea::std2wx(s)); item.SetColumn(0); GetCtrl(l)->SetItem(item); @@ -749,6 +717,40 @@ namespace creaImageIO } } + //================================================================ + void WxTreeView::SetColor(int l) + { + /* + int colorId=0; + //Setting the color according to the parent + if(l==0) + { + item.SetBackgroundColour + (wxColourDatabase().Find + (crea::std2wx(mColorPalette[colorId]))); + mColorMap.insert + (NodeColorPair + (*j,wxColourDatabase().Find + (crea::std2wx(mColorPalette[colorId])))); + if(colorId<64) + { + colorId++; + } + else + { + colorId=0; + } + } + else if(l!=mLevelList.size()-1) + { + item.SetBackgroundColour(mColorMap[*i]); + mColorMap.insert(NodeColorPair(*j,mColorMap[*i])); + } + else + { + item.SetBackgroundColour(mColorMap[*i]); + }*/ + } //================================================================ void WxTreeView::CreateColorPalette() {