From b071ae75610f98247e2efb602884e240aeeb80d8 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 25 Nov 2017 20:33:49 +0100 Subject: Allow to cancel PNG export Fixed bug: - https://bugs.launchpad.net/inkscape/+bug/1195929 --- src/ui/dialog/export.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/dialog/export.cpp') diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index d878b50a4..8c710c8e5 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -851,10 +851,11 @@ void Export::onProgressCancel () unsigned int Export::onProgressCallback(float value, void *dlg) { Gtk::Dialog *dlg2 = reinterpret_cast(dlg); - if (dlg2->get_data("cancel")) { - return FALSE; - } + Export *self = reinterpret_cast(dlg2->get_data("exportPanel")); + if (self->interrupted) + return FALSE; + gint current = GPOINTER_TO_INT(dlg2->get_data("current")); gint total = GPOINTER_TO_INT(dlg2->get_data("total")); if (total > 0) { @@ -867,7 +868,6 @@ unsigned int Export::onProgressCallback(float value, void *dlg) Gtk::ProgressBar *prg = reinterpret_cast(dlg2->get_data("progress")); prg->set_fraction(value); - Export *self = reinterpret_cast(dlg2->get_data("exportPanel")); if (self) { self->_prog.set_fraction(value); } -- cgit v1.2.3