From: C. E. B. <ce...@us...> - 2007-06-17 18:18:51
|
Update of /cvsroot/topographica/topographica/topo/tkgui In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30992/topo/tkgui Modified Files: testpattern.py Log Message: Patchwork of updates to keep current TestPattern class working with new plotgroups. (At least it opens without crashing and seems to work as well as before.) Index: testpattern.py =================================================================== RCS file: /cvsroot/topographica/topographica/topo/tkgui/testpattern.py,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** testpattern.py 5 Jun 2007 11:43:34 -0000 1.69 --- testpattern.py 17 Jun 2007 18:18:51 -0000 1.70 *************** *** 18,29 **** __version__='$Revision$' ### JABHACKALERT: Need to remove Back/Forward buttons, because they do not ### do what the user would expect. ! # CEBALERT: this file needs quite a substantial overhaul before it ! # will work well. # CEBALERT: taggedsliders refresh the display even when auto-refresh is off. import copy --- 18,32 ---- __version__='$Revision$' + ### JABHACKALERT: Need to remove Back/Forward buttons, because they do not ### do what the user would expect. ! # CEBALERT: this file needs a substantial overhaul before it will work ! # well. # CEBALERT: taggedsliders refresh the display even when auto-refresh is off. + # CB changing pattern doesn't refresh plots even when autorefresh is on. + import copy *************** *** 42,46 **** import parametersframe ! import plotgrouppanel import topoconsole --- 45,50 ---- import parametersframe ! from plotgrouppanel import XPGPanel ! #from templateplotgrouppanel import TemplatePlotGroupPanel import topoconsole *************** *** 54,66 **** ! class TestPattern(plotgrouppanel.PlotGroupPanel): ! def __init__(self,console,master,padding=2,**params): - super(TestPattern,self).__init__(console,'Preview',master,**params) self.title("Test Pattern") # CB: gets written over by something else, anyway... self.INITIAL_PLOT_HEIGHT = 100 ! self.padding = padding self.auto_refresh=True --- 58,70 ---- ! class TestPattern(XPGPanel): ! def __init__(self,console,master,label="Preview",**params): ! super(TestPattern,self).__init__(console,master,label,**params) self.title("Test Pattern") # CB: gets written over by something else, anyway... self.INITIAL_PLOT_HEIGHT = 100 ! self.padding = 2 self.auto_refresh=True *************** *** 324,328 **** ### JCALERT! it is not good to have to pass '' here... maybe a test in plot would be better plot_list.append(make_template_plot(channels,view_dict,density,None,self.normalize,name='')) ! new_plotgroup = topo.plotting.plotgroup.PlotGroup(plot_list) new_plotgroup.height_of_tallest_plot = self.plotgroup.height_of_tallest_plot new_plotgroup.initial_plot = self.plotgroup.initial_plot --- 328,336 ---- ### JCALERT! it is not good to have to pass '' here... maybe a test in plot would be better plot_list.append(make_template_plot(channels,view_dict,density,None,self.normalize,name='')) ! ! ! # CEBHACKALERT (** change any point marking hackalerts in here? ! new_plotgroup = self.generate_plotgroup() #topo.plotting.plotgroup.PlotGroup(plot_list) ! new_plotgroup.plot_list = plot_list new_plotgroup.height_of_tallest_plot = self.plotgroup.height_of_tallest_plot new_plotgroup.initial_plot = self.plotgroup.initial_plot *************** *** 333,336 **** --- 341,345 ---- new_plotgroup.minimum_height_of_tallest_plot = self.plotgroup.minimum_height_of_tallest_plot new_plotgroup.time = topo.sim.time() + self.plotgroup = new_plotgroup |