summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-11-25 19:33:49 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-11-25 19:33:49 +0000
commitb071ae75610f98247e2efb602884e240aeeb80d8 (patch)
tree7a4df5e4e346a258fd43a22d6ba43ee3a03adf41
parentlibuemf: remove COPYING again (diff)
downloadinkscape-b071ae75610f98247e2efb602884e240aeeb80d8.tar.gz
inkscape-b071ae75610f98247e2efb602884e240aeeb80d8.zip
Allow to cancel PNG export
Fixed bug: - https://bugs.launchpad.net/inkscape/+bug/1195929
-rw-r--r--src/ui/dialog/export.cpp8
1 files changed, 4 insertions, 4 deletions
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<Gtk::Dialog*>(dlg);
- if (dlg2->get_data("cancel")) {
- return FALSE;
- }
+ Export *self = reinterpret_cast<Export *>(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<Gtk::ProgressBar *>(dlg2->get_data("progress"));
prg->set_fraction(value);
- Export *self = reinterpret_cast<Export *>(dlg2->get_data("exportPanel"));
if (self) {
self->_prog.set_fraction(value);
}