diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-11-25 19:33:49 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-11-25 19:33:49 +0000 |
| commit | b071ae75610f98247e2efb602884e240aeeb80d8 (patch) | |
| tree | 7a4df5e4e346a258fd43a22d6ba43ee3a03adf41 /src/ui | |
| parent | libuemf: remove COPYING again (diff) | |
| download | inkscape-b071ae75610f98247e2efb602884e240aeeb80d8.tar.gz inkscape-b071ae75610f98247e2efb602884e240aeeb80d8.zip | |
Allow to cancel PNG export
Fixed bug:
- https://bugs.launchpad.net/inkscape/+bug/1195929
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/export.cpp | 8 |
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); } |
