]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMProjectsTreeCtrl.cxx
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMProjectsTreeCtrl.cxx
index 0d1a7ef91863fd35d92bb1e26f09b075e3c29413..e05fa97b0711b743550fcbcd1ed2491dd74e272a 100755 (executable)
@@ -81,6 +81,8 @@ bool wxCDMProjectsTreeCtrl::Create(
 {
   wxTreeCtrl::Create (parent, id, pos, size, style, validator, name);
 
+  this->DeleteAllItems();
+
   wxImageList* images = new wxImageList(20, 20, true);
   this->ID_AIcon = images->Add(wxIcon(AIcon20));
   this->ID_ApIcon = images->Add(wxIcon(ApIcon20));
@@ -95,7 +97,9 @@ bool wxCDMProjectsTreeCtrl::Create(
   this->ID_PkIcon = images->Add(wxIcon(PkIcon20));
   this->AssignImageList(images);
 
-  wxTreeItemId rootIndex = this-> AddRoot(_("No Open Project"), this->ID_Cicon, this->ID_Cicon);
+  wxTreeItemId rootId = AddRoot(wxT("Root"), 0, 0);
+/*
+  wxTreeItemId rootIndex = this->AddRoot(wxT("No Open Project"), this->ID_Cicon, this->ID_Cicon);*/
   this->Update();
   return TRUE;
 }
@@ -182,7 +186,7 @@ int wxCDMProjectsTreeCtrl::GetIconId(modelCDMIProjectTreeNode* node)
                   element = dynamic_cast<modelCDMLibrary*>(node);
                   if(element != NULL)
                     {
-                      return this->ID_LbIcon;
+                      return this->ID_LIcon;
                     }
                   else
                     {