[Avida-SVN] r1533 - branches/developers/avida-edward/source/python/AvidaGui2
jclune at myxo.css.msu.edu
jclune at myxo.css.msu.edu
Mon May 7 10:37:06 PDT 2007
Author: jclune
Date: 2007-05-07 13:37:06 -0400 (Mon, 07 May 2007)
New Revision: 1533
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
Log:
fixed the outlining, I hope
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2007-05-07 17:32:49 UTC (rev 1532)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2007-05-07 17:37:06 UTC (rev 1533)
@@ -244,10 +244,14 @@
self.m_cell_info[cell_id] = self.createNewCellItem(cell_id)
cell_info_item = self.m_cell_info[cell_id]
self.m_indexer(cell_info_item, self.m_cs_min_value, self.m_cs_value_range)
+
+ #the following code used to delete the gay pre-run outline. since we want it to
+ #remain till an org is born in the cell, similar functionality has been moved below
#the following could be moved to a one off function at the beginning of a run
#for speed efficiency. currenly it is checked every time a cell is updated
- if ( (cell_info_item.pen().color() == QColor((Qt.gray))) & self.m_session_mdl.m_avida_has_started == True):
- cell_info_item.setPen(QPen(Qt.NoPen))
+# if ( (cell_info_item.pen().color() == QColor((Qt.gray))) & self.m_session_mdl.m_avida_has_started == True):
+# cell_info_item.setPen(QPen(Qt.NoPen))
+
#if it is not the pre-run outline color (gray) or the org_clicked_on highlight
#color (bright green) then take away the outline (it will be added back later
@@ -271,12 +275,18 @@
brush_color = cell_info_item.updateColorUsingFunctor(self.m_color_lookup_functor)
+ if(cell_info_item.pen().color() == QColor(Qt.gray)): #if the outline is from pre-run (gray)
+ if(self.m_session_mdl.m_avida_has_started == True): #and avida has started
+ if(brush_color.getRgb() != QColor(Qt.black).getRgb()): #and the square has color (means at least one org has been born into it)
+ cell_info_item.setPen(QPen(Qt.NoPen)) #then get rid of the gray ('this was a pre-run seed') outline
+
if self.m_org_clicked_on_item:
if cell_info_item.m_population_cell.GetID == self.m_org_clicked_on_item.m_population_cell.GetID:
cell_info_item.setPen(QPen(QColor(0,255,0),2))
else:
# cell_info_item.setPen(QPen(Qt.NoPen))
self.m_last_cell_outlined = cell_info_item
+
More information about the Avida-cvs
mailing list