Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Francis <francis@sugarlabs.org>2012-10-26 14:46:59 (GMT)
committer Daniel Francis <francis@sugarlabs.org>2012-10-26 14:46:59 (GMT)
commit712d31267d7f0e6ddbbc9ca3bff6d73446964142 (patch)
treee8151e834e9c389e00165e50dd3aa78f87d61c2c
parente4bce50efe5db0d6f6a4d343077930ebb18d2c9b (diff)
ASLO editor correction: Don't scale if the selection looks as a line
Signed-off-by: Daniel Francis <francis@sugarlabs.org>
-rw-r--r--graph.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/graph.py b/graph.py
index ef15176..042d459 100644
--- a/graph.py
+++ b/graph.py
@@ -306,13 +306,13 @@ class Graph(gtk.DrawingArea):
self.context.rectangle(x0, y0, w, h)
self.context.set_line_width(0.5)
self.context.stroke()
- self.context.set_line_width(0.5)
- x0 = min(self.selection[0][0], int(self.selection[1][0]))
- y0 = min(self.selection[0][1], int(self.selection[1][1]))
- w = abs(int(self.selection[1][0]) - self.selection[0][0])
- h = abs(int(self.selection[1][1]) - self.selection[0][1])
- self.context.rectangle(x0, y0, w, h)
- self.context.stroke()
+ self.context.set_line_width(0.5)
+ x0 = min(self.selection[0][0], int(self.selection[1][0]))
+ y0 = min(self.selection[0][1], int(self.selection[1][1]))
+ w = abs(int(self.selection[1][0]) - self.selection[0][0])
+ h = abs(int(self.selection[1][1]) - self.selection[0][1])
+ self.context.rectangle(x0, y0, w, h)
+ self.context.stroke()
self.context.set_line_width(2)
return True
else: