From fa861187a8ae6482b159f8a799aeb98cbaee5922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 19 Nov 2014 21:26:26 +0100 Subject: [PATCH] Fix save graph after refactoring of changeset 0535f5cf7e00 issue4337 review6671003 --- tryton/gui/window/view_form/view/graph.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/graph.py b/tryton/gui/window/view_form/view/graph.py index 21051305e7..bcba52c53a 100644 --- a/tryton/gui/window/view_form/view/graph.py +++ b/tryton/gui/window/view_form/view/graph.py @@ -95,7 +95,7 @@ class ViewGraph(View): def get_buttons(self): return [] - def save(self, widget, graph): + def save(self, widget): parent = get_toplevel_window() dia = gtk.Dialog(_('Save As'), parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, @@ -162,7 +162,8 @@ class ViewGraph(View): if not filename.endswith('.png'): filename = filename + '.png' try: - graph.export_png(filename, width, height) + self.widgets['root'].export_png( + filename, width, height) break except MemoryError: message(_('Image size too large!'), dia,