]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOWxTreeView.cpp
Cleaned the viewer and deactivated color function
[creaImageIO.git] / src2 / creaImageIOWxTreeView.cpp
index 1d5663fd83e02f56263fecc49b48c46927845a85..3a24eb49c714ce34db23bb793f7845ee9cd8bcdb 100644 (file)
@@ -306,9 +306,7 @@ namespace creaImageIO
                            <<"'"<<level
                            <<std::endl);
        int _id=1;
-       int colorId=0;
-
-       
+               
 
        //Adds items (other than the first) and sets their attributes 
        GetTreeHandler()->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()
   {