[Avida-cvs] [avida-svn] r787 - branches/developers/avida-edward/source/python/AvidaGui2

jclune@myxo.css.msu.edu jclune at myxo.css.msu.edu
Fri Jun 30 12:34:26 PDT 2006


Author: jclune
Date: 2006-06-30 15:34:26 -0400 (Fri, 30 Jun 2006)
New Revision: 787

Modified:
   branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
   branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
   branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
Log:
Petri dish now outlines the organisms that will start that run. Both individual ancestors and full petri dishes.

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-06-30 01:06:47 UTC (rev 786)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_PetriDishCtrl.py	2006-06-30 19:34:26 UTC (rev 787)
@@ -40,10 +40,6 @@
       self.ToggleDishSlot)
     self.connect(self.m_session_mdl.m_session_mdtr, 
       PYSIGNAL("doDefrostDishSig"), self.DefrostSlot)
-#    self.connect(self.m_session_mdl.m_session_mdtr, 
-#       PYSIGNAL("doDefrostDishSig"), self.RenameDishSlot)
-#    self.connect(self.m_session_mdl.m_session_mdtr, 
-#       PYSIGNAL("doDefrostDishSig"), self.MakeConfigVisiableSlot)
     self.connect(self.m_session_mdl.m_session_mdtr, 
        PYSIGNAL("doDisablePetriDishSig"), self.SetDishDisabledSlot)
     self.connect(self.m_session_mdl.m_session_mdtr, 
@@ -212,7 +208,6 @@
 
       current_page = self.m_petri_dish_widget_stack.visibleWidget()
       current_page_int = self.m_petri_dish_widget_stack.id(current_page)
-      self.MakeConfigVisibleSlot()
 
   def DefrostSlot(self, dish_name, petri_dict):
       descr()
@@ -220,7 +215,6 @@
 #    if self.isVisible():
       print "self is ", self
 
-      Restart_Only_Flag = False
       # If the petri dish is already filled prompt the user if they want to 
       # freeze the existing dish
       
@@ -234,8 +228,8 @@
         if (not self.m_session_mdl.saved_full_dish):
           m_check_to_freeze = pyQuitDialogCtrl("Start New Experiment")
           quit_return = m_check_to_freeze.showDialog()
+
           if quit_return == m_check_to_freeze.QuitFlag:
-            Restart_Only_Flag = True
             self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doEnablePetriDishSig"), ())
           elif quit_return == m_check_to_freeze.FreezeQuitFlag:
             self.m_session_mdl.m_session_mdtr.emit(PYSIGNAL("doEnablePetriDishSig"), ())
@@ -257,9 +251,8 @@
       while (not self.finishedPetriDish):
         pass
 
-      if (Restart_Only_Flag):
-        self.m_session_mdl.m_session_mdtr.emit(
-          PYSIGNAL("restartPopulationSig"), (self.m_session_mdl, ))
+      self.m_session_mdl.m_session_mdtr.emit(
+       PYSIGNAL("restartPopulationSig"), (self.m_session_mdl, ))
 
 
   def finishedPetriDishSlot(self):

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py	2006-06-30 01:06:47 UTC (rev 786)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py	2006-06-30 19:34:26 UTC (rev 787)
@@ -639,7 +639,15 @@
         core_name = freezer_item_name[:-9]
         core_name = os.path.basename(str(freezer_item_name[:-9]))
         tmp_item = QIconViewItem(self.AncestorIconView, core_name, self.image0)
-        return
+        #initialize Avida (which repaints the dish)
+      print "ABOUT TO SEND INIT"
+      self.m_session_mdl.m_session_mdtr.emit(
+        PYSIGNAL("doInitializeAvidaPhaseISig"),
+        (self.m_session_mdl.m_tempdir,))
+      print "INIT SENT"
+#        if you are reading this, the next line doesn't matter and should die
+#        return
+        
 
   def petriAncestorDroppedSlot(self, e):
     descr()

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py	2006-06-30 01:06:47 UTC (rev 786)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py	2006-06-30 19:34:26 UTC (rev 787)
@@ -70,10 +70,6 @@
     self.connect(
       self.m_session_mdl.m_session_mdtr, PYSIGNAL("doStartAvidaSig"),
       self.doStartAvidaSlot)
-#    if you read this, delete this chunk of comments
-#    self.connect(
-#      self.m_session_mdl.m_session_mdtr, PYSIGNAL("doInitializeAvidaPhaseISig"),
-#      self.doSetAvidaHasStartedFalseSlot)
     self.connect( self.m_session_mdl.m_session_mdtr, PYSIGNAL("setAvidaSig"), 
       self.setAvidaSlot)
     self.connect( self.m_canvas_view, PYSIGNAL("orgClickedOnSig"), 
@@ -179,7 +175,6 @@
       m_founding_cells_dict = self.m_session_mdl.m_founding_cells_dict
 
       for k, v in m_founding_cells_dict.iteritems():
-        print k
         cell_info_item = self.updateCellItem(int(k))
         cell_info_item.setPen(QPen(QColor(Qt.gray)))
 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-06-30 01:06:47 UTC (rev 786)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyWriteGenesisEvent.py	2006-06-30 19:34:26 UTC (rev 787)
@@ -22,9 +22,13 @@
     # If this is a full petri dish inject all the organisms, otherwise
     # inject the start creature in the center of the grid
     
-    if in_dict.has_key("CELLS"):
+    #if we have a full petri dish...
+    if in_dict.has_key("CELLS"): 
       cells_dict = in_dict["CELLS"]
       organisms_dict = in_dict["ORGANISMS"]
+      self.m_session_mdl.m_founding_cells_dict = cells_dict
+
+    #if it is not a full petri dish
     else:
       cells_dict = {}
       organisms_dict = {}
@@ -46,8 +50,8 @@
           self.start_cell_location = self.find_location(world_x, world_y, 
              num_ancestors, i)
           cells_dict[str(self.start_cell_location)] = str(i)
-          print "CELL DICT IS ", self.m_session_mdl.m_founding_cells_dict
           #this variable is used in pyPetriDishCtrl.py to outline the founding organisms
+          self.m_session_mdl.m_founding_cells_dict = None
           self.m_session_mdl.m_founding_cells_dict = cells_dict
 
           # Read the genome from the organism file 

Modified: branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/to-do_list	2006-06-30 01:06:47 UTC (rev 786)
+++ branches/developers/avida-edward/source/python/AvidaGui2/to-do_list	2006-06-30 19:34:26 UTC (rev 787)
@@ -174,3 +174,9 @@
 30-May-06 Printing of petri dish and of color scale -- Finished 06-Jun-06
 30-May-06 Fill out save image dialog with default filename that includes update and other info -- Finished 19-Jun-06
 12-Jun-06 Add ability to analyze more than one population. -- Finished 22-Jun-06
+
+
+*************Jeff********************
+June
+-Petri dish now outlines the organisms that are about to start that run
+-Scroll bars are working again (though hard coded)




More information about the Avida-cvs mailing list