[Avida-cvs] [Avida2-svn] r398 - branches/developers/avida-edward/source/python/AvidaGui2
baerb@myxo.css.msu.edu
baerb at myxo.css.msu.edu
Tue Nov 15 09:22:29 PST 2005
Author: baerb
Date: 2005-11-15 12:22:29 -0500 (Tue, 15 Nov 2005)
New Revision: 398
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogView.ui
branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py
Log:
Changed the freeze petri dish dialog so that user can not save a full petri dish if there are no organisms.
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogCtrl.py 2005-11-14 19:04:11 UTC (rev 397)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogCtrl.py 2005-11-15 17:22:29 UTC (rev 398)
@@ -11,9 +11,13 @@
def __init__(self):
pyFreezeDialogView.__init__(self)
- def showDialog(self, freezer_dir = None):
+ def showDialog(self, freezer_dir = None, freeze_empty_only_flag = False):
found_valid_name = False
dialog_result = 1
+ if freeze_empty_only_flag == True:
+ self.FullRadioButton.setEnabled(False)
+ else:
+ self.FullRadioButton.setEnabled(True)
while (found_valid_name == False and dialog_result > 0):
while (self.exec_loop() and self.result() == 0):
pass
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogView.ui
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogView.ui 2005-11-14 19:04:11 UTC (rev 397)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyFreezeDialogView.ui 2005-11-15 17:22:29 UTC (rev 398)
@@ -47,38 +47,41 @@
</property>
<widget class="QRadioButton">
<property name="name">
- <cstring>FullRadioButton</cstring>
+ <cstring>EmptyRadioButton</cstring>
</property>
<property name="geometry">
<rect>
- <x>170</x>
+ <x>10</x>
<y>10</y>
- <width>117</width>
+ <width>140</width>
<height>22</height>
</rect>
</property>
<property name="text">
- <string>Full Petri Dish</string>
+ <string>Empty Petri Dish</string>
</property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
</widget>
<widget class="QRadioButton">
<property name="name">
- <cstring>EmptyRadioButton</cstring>
+ <cstring>FullRadioButton</cstring>
</property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="geometry">
<rect>
- <x>10</x>
+ <x>170</x>
<y>10</y>
- <width>140</width>
+ <width>117</width>
<height>22</height>
</rect>
</property>
<property name="text">
- <string>Empty Petri Dish</string>
+ <string>Full Petri Dish</string>
</property>
- <property name="checked">
- <bool>true</bool>
- </property>
</widget>
</widget>
<widget class="QLayoutWidget">
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py 2005-11-14 19:04:11 UTC (rev 397)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriConfigureCtrl.py 2005-11-15 17:22:29 UTC (rev 398)
@@ -350,10 +350,15 @@
def FreezePetriSlot(self, population_dict = None, send_reset_signal = False, send_quit_signal = False):
descr()
+ if len(population_dict) == 0:
+ freeze_empty_only_flag = True;
+ else:
+ freeze_empty_only_flag = False;
tmp_dict = {}
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 = m_pop_up_freezer_file_name.showDialog(self.m_session_mdl.m_current_freezer,
+ freeze_empty_only_flag)
file_name_len = len(file_name.rstrip())
# If the user is saving a full population expand the name and insert
More information about the Avida-cvs
mailing list