@@ -44,23 +44,27 @@ def __init__(self, simpack_selection_dialog):
4444 assert isinstance (simpack_selection_dialog , SimpackSelectionDialog )
4545 self .simpack_selection_dialog = simpack_selection_dialog
4646
47+ self .simpack_places_tree = []
48+
4749 #self.AddColumn('', width=600)
4850 #self.SetMainColumn(1)
4951 self .root_item_id = self .AddRoot ("GarlicSim's simpack library" )
5052 self .AppendItem (self .root_item_id , "Conway's Game of Life" )
5153 self .AppendItem (self .root_item_id , "Prisoner's Dilemma" )
5254 self .AppendItem (self .root_item_id , 'Queueing Theory' )
53-
5455
55- def refresh_simpacks ( self ):
56+ self . ExpandAll ()
5657
58+
59+ def _refresh_internal_tree (self ):
60+
5761 # Ensuring all simpack place paths are in `sys.path`:
5862 for path , package_prefix in garlicsim_wx .simpack_places :
5963 if path not in sys .path :
6064 sys .path .append (path )
6165
6266
63- simpack_places_tree = [ ]
67+ del self . simpack_places_tree [: ]
6468
6569 for path , package_prefix in garlicsim_wx .simpack_places :
6670
@@ -106,10 +110,17 @@ def refresh_simpacks(self):
106110
107111 entry = {'name' : name ,
108112 'path' : path ,
109- 'simpacks' : [] }
113+ 'simpacks' : simpacks }
110114
111- simpack_places_tree .append (entry )
115+ self .simpack_places_tree .append (entry )
116+
117+
118+ def refresh_simpacks (self ):
119+
120+
121+ self .RootItem
112122
123+ #for roots in self.GetRootItem
113124
114125
115126from .simpack_selection_dialog import SimpackSelectionDialog
0 commit comments