Skip to content

Commit 31e493c

Browse files
committed
Objectedit: get color are now place in checkUtil which is now directed, kkit: crosscompartment destination pool is checked
1 parent 4cee03c commit 31e493c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

objectedit.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Maintainer:
77
# Created: Wed Jun 30 11:18:34 2010 (+0530)
88
# Version:
9-
# Last-Updated: Mon Sep 10 11:05:59 2017 (+0530)
9+
# Last-Updated: Fri Feb 01 11:05:59 2017 (+0530)
1010
# By: Harsha
1111
# Update #:
1212
# URL:
@@ -77,11 +77,13 @@
7777
from collections import deque
7878
import traceback
7979

80-
sys.path.append('../python')
80+
#sys.path.append('../python')
8181
import moose
8282
import defaults
8383
import config
84-
from plugins.kkitUtil import getColor
84+
#from plugins.kkitUtil import getColor
85+
from moose.chemUtil.chemConnectUtil import getColor
86+
8587
#these fields will be ignored
8688
extra_fields = ['this',
8789
'me',
@@ -437,7 +439,7 @@ def __init__(self, mobject, undolen=defaults.OBJECT_EDIT_UNDO_LENGTH, parent=Non
437439
def setColor(self, color):
438440
self.colorButton.setStyleSheet(
439441
"QPushButton {"
440-
+ "background-color: {0}; color: {0};".format(color.name())
442+
+ "background-color: {0}; color: {0};".format(color)
441443
+ "}"
442444
)
443445
self.colorDialog.setCurrentColor(color)

plugins/kkit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
__maintainer__ = "HarshaRani"
77
__email__ = "[email protected]"
88
__status__ = "Development"
9-
__updated__ = "Oct 26 2018"
9+
__updated__ = "Feb 22 2019"
1010

1111
#Change log:
12+
#2019
13+
#Feb 22: cross compartment molecules are checked for destination
1214
# 2018
1315
#Oct 26: xfer cross compartment molecules are hidden and for cross compartment reaction's
1416
# connection are now dotted line
@@ -771,7 +773,6 @@ def drawLine_arrow(self, itemignoreZooming=False):
771773
print (inn.className + ' : ' +inn.name+ " doesn't output message")
772774
else:
773775
for items in (items for items in out[0] ):
774-
des = self.mooseId_GObj[element(items[0])]
775776
if re.search("xfer",element(items[0]).name):
776777
xrefPool = items[0].name[:items[0].name.index("_xfer_")]
777778
xrefCompt = items[0].name[items[0].name.index("_xfer_") + len("_xfer_"):]
@@ -781,6 +782,7 @@ def drawLine_arrow(self, itemignoreZooming=False):
781782
itemslist[0] = orgPool
782783
items = tuple(itemslist)
783784
linetype = "crosscompt"
785+
des = self.mooseId_GObj[element(items[0])]
784786
self.lineCord(src,des,items,itemignoreZooming,linetype)
785787
if len(out[1]) == 0:
786788
print (inn.className + ' : ' +inn.name+ " doesn't output message")

0 commit comments

Comments
 (0)