[Avida-cvs] [avida-svn] r821 - branches/developers/avida-edward/source/python/AvidaGui2
jclune@myxo.css.msu.edu
jclune at myxo.css.msu.edu
Mon Jul 10 21:55:11 PDT 2006
Author: jclune
Date: 2006-07-11 00:55:10 -0400 (Tue, 11 Jul 2006)
New Revision: 821
Modified:
branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
Log:
ancestor highlighting now goes back go gray after being clicked on and then off again pre-run. also fixed a bug where you couldn't click on an org and then hit run with that outline still there.
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py 2006-07-11 01:40:30 UTC (rev 820)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyOnePop_StatsCtrl.py 2006-07-11 04:55:10 UTC (rev 821)
@@ -34,6 +34,12 @@
print "pyOnePop_StatsCtrl.setAvidaSlot() ..."
old_avida = self.m_avida
self.m_avida = avida
+
+ #this prevents the org report from asking about the org clicked on (highlighted)
+ #before the run was started, because such a question would try to access an object
+ #that gets deleted when the run starts (unbeknowst to avida)
+ self.m_clicked_cell_number = -99
+
if(old_avida):
print "pyOnePop_StatsCtrl.setAvidaSlot() disconnecting old_avida ..."
self.disconnect(
Modified: branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2006-07-11 01:40:30 UTC (rev 820)
+++ branches/developers/avida-edward/source/python/AvidaGui2/pyPetriDishCtrl.py 2006-07-11 04:55:10 UTC (rev 821)
@@ -143,6 +143,9 @@
self.m_avida = avida
if(old_avida):
print "pyPetriDishCtrl.setAvidaSlot() deleting old_avida ..."
+ self.m_org_clicked_on_item = None
+ self.m_last_cell_outlined = None
+ self.m_last_cell_outlined_color = None
del old_avida
if(self.m_avida):
pass
@@ -156,9 +159,6 @@
self.m_world_h = 30
self.m_avida_has_started = False
- print "SEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEET"
-
-
self.m_initial_target_zoom = int(self.m_target_dish_width / self.m_world_w)
self.emit(PYSIGNAL("zoomSig"), (self.m_initial_target_zoom,))
@@ -212,9 +212,12 @@
clicked_cell = self.m_avida.m_population.GetCell(int(clicked_cell_num))
organism = clicked_cell.GetOrganism()
- # tee up drag information
- dragHolder = self.itemDrag( ('organism.' + str(organism.GetGenome().AsString())), self )
- dragHolder.dragCopy()
+ #if the organism is not an empty org (e.g. ancestor dragged in that has
+ #not been run yet)
+ if organism is not None:
+ # tee up drag information
+ dragHolder = self.itemDrag( ('organism.' + str(organism.GetGenome().AsString())), self )
+ dragHolder.dragCopy()
def setRange(self, min, max):
self.m_cs_min_value = min
@@ -225,15 +228,17 @@
def updateOrgClickedOutlineCellNumberSlot(self, org_clicked_on_item = None):
if self.m_org_clicked_on_item:
- self.m_org_clicked_on_item.setPen(QPen(Qt.NoPen))
+ self.m_org_clicked_on_item.setPen(self.m_last_m_org_clicked_on_item_color)
self.m_org_clicked_on_item = org_clicked_on_item
if self.m_org_clicked_on_item:
self.updateCellItems(self.m_org_clicked_on_item.m_population_cell.GetID())
self.m_last_m_org_clicked_on_item = self.m_org_clicked_on_item
else:
if hasattr(self,"m_last_cell_outlined"):
- self.m_last_cell_outlined.setPen(QPen(Qt.NoPen))
- self.updateCellItems(self.m_last_m_org_clicked_on_item.m_population_cell.GetID())
+ if self.m_last_cell_outlined is not None:
+ print "HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+ self.m_last_cell_outlined.setPen(self.m_last_m_org_clicked_on_item_color)
+ self.updateCellItems(self.m_last_m_org_clicked_on_item.m_population_cell.GetID())
def updateCellItem(self, cell_id):
if self.m_cell_info[cell_id] is None:
@@ -243,13 +248,15 @@
#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_avida_has_started == True):
- print "77777777777777777777777777777777777777777777777777777"
cell_info_item.setPen(QPen(Qt.NoPen))
cell_info_item.updateColorUsingFunctor(self.m_color_lookup_functor)
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:
+ print "COLOR ABOUT TO BE TURNED GREEN IS ", cell_info_item.pen().color().getRgb()
+# self.m_last_m_org_clicked_on_item_color = cell_info_item.pen().color().getRgb()
+ self.m_last_m_org_clicked_on_item_color = cell_info_item.pen()
cell_info_item.setPen(QPen(QColor(0,255,0)))
self.m_last_cell_outlined = cell_info_item
return cell_info_item
Modified: branches/developers/avida-edward/source/python/AvidaGui2/to-do_list
===================================================================
--- branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-07-11 01:40:30 UTC (rev 820)
+++ branches/developers/avida-edward/source/python/AvidaGui2/to-do_list 2006-07-11 04:55:10 UTC (rev 821)
@@ -1,4 +1,4 @@
-Change Viewer Icons to different ones than freezer
+hange Viewer Icons to different ones than freezer
Click on freezer name same on clicking on expand/contract
@@ -57,8 +57,10 @@
************Jeff*******************
Priority High
--make scroll bars dynamic (1/26/05)
--make tasks reflect parent tasks (not real time) in org report (ask group first) (1/26/06)
+-fix the bugs with the lineage label (typically full petri dish)
+-make the org report give the name of the ancestor when they are clicked on
+-make tasks reflect parent tasks (not real time) in org report (pending group decision) (1/26/06)
+-add task information to petri dish
Priority Medium
-make the getting rid of the outline of the cells something that doesn't slow down the code at every step
@@ -225,3 +227,5 @@
-Scroll bars are now dynamic (30th)
July
+-fix the prerun crashes for clicking around petri dish ancestors
+-fix the problem that the gray outline of ancestors is going away if they are clicked on then off again pre-run
More information about the Avida-cvs
mailing list