diff options
author | Daniel Francis <francis@sugarlabs.org> | 2012-10-26 14:46:59 (GMT) |
---|---|---|
committer | Daniel Francis <francis@sugarlabs.org> | 2012-10-26 14:46:59 (GMT) |
commit | 712d31267d7f0e6ddbbc9ca3bff6d73446964142 (patch) | |
tree | e8151e834e9c389e00165e50dd3aa78f87d61c2c | |
parent | e4bce50efe5db0d6f6a4d343077930ebb18d2c9b (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.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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: |