|
6 | 6 | __maintainer__ = "HarshaRani" |
7 | 7 | __email__ = "hrani@ncbs.res.in" |
8 | 8 | __status__ = "Development" |
9 | | -__updated__ = "Oct 18 2017" |
10 | | -''' |
| 9 | +__updated__ = "Jun 19 2018" |
| 10 | + |
| 11 | +#Change log: |
| 12 | +# 2018 Jun 18: update the color of the group from objecteditor |
| 13 | + |
| 14 | +#code |
11 | 15 |
|
12 | | -''' |
13 | 16 | import math |
14 | 17 | import sys |
15 | 18 | from PyQt4 import QtGui, QtCore, Qt |
@@ -483,14 +486,20 @@ def updateItemSlot(self, mooseObject): |
483 | 486 | self.positionChange(mooseObject) |
484 | 487 | self.view.removeConnector() |
485 | 488 | self.view.showConnector(item) |
486 | | - def updateColorSlot(self,mooseObject, color): |
487 | | - #Color slot for changing background color for PoolItem from objecteditor |
| 489 | + def updateColorSlot(self,mooseObject, colour): |
| 490 | + #Color slot for changing background color for Pool,Enz and group from objecteditor |
488 | 491 | anninfo = moose.Annotator(mooseObject.path+'/info') |
489 | 492 | textcolor,bgcolor = getColor(anninfo) |
490 | | - anninfo.color = str(color.name()) |
491 | | - item = self.mooseId_GObj[mooseObject] |
492 | | - if (isinstance(item,PoolItem) or isinstance(item,EnzItem) or isinstance(item,MMEnzItem) ): |
493 | | - item.updateColor(color) |
| 493 | + anninfo.color = str(colour.name()) |
| 494 | + |
| 495 | + if mooseObject.className == "Neutral": |
| 496 | + item = self.qGraGrp[mooseObject] |
| 497 | + item.setPen(QtGui.QPen(QtGui.QColor(colour),item.pen().width(),item.pen().style(),item.pen().capStyle(),item.pen().joinStyle()))# self.comptPen, Qt.Qt.SolidLine, Qt.Qt.RoundCap, Qt.Qt.RoundJoin)) |
| 498 | + |
| 499 | + elif (isinstance(mooseObject,PoolBase) or isinstance(mooseObject,EnzBase) ): |
| 500 | + item = self.mooseId_GObj[mooseObject] |
| 501 | + item.updateColor(colour) |
| 502 | + |
494 | 503 | ''' |
495 | 504 | def mooseObjOntoscene(self): |
496 | 505 | # All the compartments are put first on to the scene \ |
|
0 commit comments