[Avida-cvs] [Avida2-svn] r218 - trunk/source/python/AvidaGui2

baerb@myxo.css.msu.edu baerb at myxo.css.msu.edu
Tue Jun 21 18:21:27 PDT 2005


Author: baerb
Date: 2005-06-21 21:21:27 -0400 (Tue, 21 Jun 2005)
New Revision: 218

Modified:
   trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py
Log:
Fixed problem with saving empty dishes.



Modified: trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py
===================================================================
--- trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py	2005-06-21 19:30:08 UTC (rev 217)
+++ trunk/source/python/AvidaGui2/pyPetriConfigureCtrl.py	2005-06-22 01:21:27 UTC (rev 218)
@@ -247,11 +247,12 @@
     tmp_dict["SETTINGS"] = self.Form2Dictionary()
     m_pop_up_freezer_file_name = pyFreezeDialogCtrl()
     file_name = m_pop_up_freezer_file_name.showDialog(self.m_session_mdl.m_current_freezer)
+    file_name_len = len(file_name.rstrip())
 
     # If the user is saving a full population expand the name and insert
     # the population dictionary into the temporary dictionary
 
-    if (not m_pop_up_freezer_file_name.isEmpty()):
+    if (file_name_len > 0):
       os.mkdir(file_name)
 
       # Copy the average and count files from the teporary output directory
@@ -261,7 +262,7 @@
       shutil.copyfile(os.path.join(self.m_session_mdl.m_tempdir_out, "count.dat"), os.path.join(file_name, "count.dat"))
       file_name = os.path.join(file_name, "petri_dish")
       tmp_dict["POPULATION"] = population_dict
-      is_empty_dish = m_pop_up_freezer_file_name.EmptyRadioButton.isChecked()
+      is_empty_dish = m_pop_up_freezer_file_name.isEmpty()
       freezer_file = pyWriteToFreezer(tmp_dict, is_empty_dish, file_name)
     
     self.m_session_mdl.m_session_mdtr.emit(




More information about the Avida-cvs mailing list