...
[iramuteq] / tree.py
diff --git a/tree.py b/tree.py
index 708e0dc..8718845 100644 (file)
--- a/tree.py
+++ b/tree.py
@@ -125,6 +125,7 @@ class LeftTree(CT.CustomTreeCtrl):
         self.ild['chi2'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'chi2.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
         self.ild['reinertmatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'reinertmatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
         self.ild['simimatrix'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'simimatrix.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
+        self.ild['proto'] = self.il.Add(wx.Image(os.path.join(self.parent.images_path,'proto.png'), wx.BITMAP_TYPE_PNG).Scale(16,16).ConvertToBitmap())
         self.SetImageList(self.il)
         
         self.count = 0
@@ -412,7 +413,13 @@ class LeftTree(CT.CustomTreeCtrl):
                     item = self.parent.matrix_menu.FindItemByPosition(i)
                     itemid = item.GetId()
                     itemtext = item.GetText()
-                    menu.Append(itemid, itemtext)
+                    if item.IsSubMenu() :
+                        nmenu = wx.Menu()
+                        for val in item.GetSubMenu().GetMenuItems() :
+                            nmenu.Append(val.GetId(), val.GetText())
+                        menu.AppendMenu(itemid, itemtext, nmenu)
+                    else :
+                        menu.Append(itemid, itemtext)
                 split = wx.Menu()
                 splitfromvar = split.Append(-1, _(u"Split from variable").decode('utf8'))
                 menu.AppendMenu(-1, _(u"Split matrix").decode('utf8'), split)