summaryrefslogtreecommitdiff
path: root/src/main/python
diff options
context:
space:
mode:
authorBlaine2020-06-03 15:15:17 +0530
committerBlaine2020-06-03 15:28:13 +0530
commit7ee06d0881716dfe00d395ec25551a83a690722a (patch)
tree2e73c76ae660287a7ef4678f2dc777144833acb4 /src/main/python
parente1cde189d5eeec7c13c7d3b65b54a9579730d34a (diff)
downloadChemical-PFD-7ee06d0881716dfe00d395ec25551a83a690722a.tar.gz
Chemical-PFD-7ee06d0881716dfe00d395ec25551a83a690722a.tar.bz2
Chemical-PFD-7ee06d0881716dfe00d395ec25551a83a690722a.zip
changes
Diffstat (limited to 'src/main/python')
-rw-r--r--src/main/python/shapes/line.py2
-rw-r--r--src/main/python/shapes/shapes.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/python/shapes/line.py b/src/main/python/shapes/line.py
index 2d7eba8..f5eb92a 100644
--- a/src/main/python/shapes/line.py
+++ b/src/main/python/shapes/line.py
@@ -201,7 +201,7 @@ class Line(QGraphicsPathItem):
for i in range(len(self.points) - 1):
x1, y1 = self.points[i].x(), self.points[i].y()
x2, y2 = self.points[i+1].x(), self.points[i+1].y()
- for point in self.commonPaths.sort(key = lambda x: x.x() + x.y(), reverse=x2<x1 or y2<y1):
+ for point in sorted(self.commonPaths, key = lambda x: x.x() + x.y(), reverse=x2<x1 or y2<y1):
x, y = point.x(), point.y()
# if not x1 * (y - y2) + x * (y2 - y1) + x2 * (y1 - y) :
if x == x1 == x2:
diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py
index 5abb6a4..5bd68e2 100644
--- a/src/main/python/shapes/shapes.py
+++ b/src/main/python/shapes/shapes.py
@@ -287,9 +287,16 @@ class NodeItem(QGraphicsSvgItem):
QGraphicsSvgItem.__init__(self, parent)
self.m_type = unitOperationType
self.id = None
+<<<<<<< HEAD
self.m_renderer = NodeItem.renderer
# if each svg is seperate file
# self.m_renderer = QSvgRenderer(fileImporter(f'svg/ellipse.svg'))
+=======
+ # self.m_renderer = QSvgRenderer("svg/" + unitOperationType + ".svg")
+ # self.m_renderer = QSvgRenderer(fileImporter(f'svg/{unitOperationType}.svg'))
+ self.m_renderer = QSvgRenderer(fileImporter(f'svg/ellipse.svg'))
+ # self.m_renderer = QSvgRenderer(resourceManager.get_resource(f'toolbar/{unitOperationType}.svg'))
+>>>>>>> changes
self.setSharedRenderer(self.m_renderer)
# set initial size of item
self.width = 100