]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxTreeView.cpp
Added validation on frame exit
[creaImageIO.git] / src2 / creaImageIOWxTreeView.cpp
index 64d395af23c38bf60c4ee69bf5a3c75c9755f1d1..4aca9f841bb524e9657ded94c9797e43875cb9df 100644 (file)
@@ -298,6 +298,9 @@ namespace creaImageIO
                            <<"'"<<level
                            <<std::endl);
        int _id=0;
+       int r=100;
+       int g=100;
+       int b=100;
        //Adds columns
        GetTreeHandler()->LoadChildren(*i,1);
        tree::Node::ChildrenListType::reverse_iterator j;
@@ -334,10 +337,30 @@ namespace creaImageIO
                
            item.SetText( crea::std2wx(s));
            //      item.SetTextColour(*wxRED);
-           //      item.SetBackgroundColour(*wxBLACK); 
+
+               //Setting the color according to the parent
+               /*
+               if(l==0)
+               {
+               item.SetBackgroundColour(wxColour(r,g,b)); 
+                       mColorMap.insert(NodeColorPair(*j,wxColour(r,g,b)));
+               }
+               else if(l!=mLevelList.size()-1)
+               {
+                       item.SetBackgroundColour(mColorMap[*i]); 
+                       mColorMap.insert(NodeColorPair(*j,mColorMap[*i]));
+               }
+               else
+               {
+                       item.SetBackgroundColour(mColorMap[*i]); 
+               }
+                       r+=20;
+                       g+=20;
+                       b+=20;*/
+
            item.SetColumn(0);
 
-               //Sets the last level as selecte....How to make it select only the first time?
+               //Sets the last level as selected....How to make it select only the first time?
                //if (level==mLevelList.size()) item.SetState(wxLIST_STATE_SELECTED);
 
            GetCtrl(l)->SetItem(item);