diff options
| author | Olli Parviainen <oparviai@iki.fi> | 2018-12-08 21:11:46 +0000 |
|---|---|---|
| committer | Olli Parviainen <oparviai@iki.fi> | 2018-12-08 21:11:46 +0000 |
| commit | 0da7d01ffa1590174d76a7726da59541e5e3fe61 (patch) | |
| tree | bd61f6eeb63a4feb1c3c8588784189b888c39c8f /src | |
| parent | Accelerate the break-apart operation for larger paths by disabling redrawing ... (diff) | |
| download | inkscape-0da7d01ffa1590174d76a7726da59541e5e3fe61.tar.gz inkscape-0da7d01ffa1590174d76a7726da59541e5e3fe61.zip | |
Accelerate boolean path operation for larger paths by disabling redrawing the canvas during running of the break-apart algorithm.
This change reduces duration of e.g. cut-path operation to a fraction of the original when working with a large path set.
Signed-off-by: Olli Parviainen <oparviai@iki.fi>
Diffstat (limited to 'src')
| -rw-r--r-- | src/splivarot.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp index b986af32e..1f4b4e9b5 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -38,6 +38,8 @@ #include "text-editing.h" #include "verbs.h" +#include "display/sp-canvas.h" + #include "helper/geom.h" #include "livarot/Path.h" @@ -321,7 +323,11 @@ BoolOpErrors Inkscape::ObjectSet::pathBoolOp(bool_op bop, const bool skip_undo, { if (nullptr != desktop() && !checked) { SPDocument *doc = desktop()->getDocument(); + // don't redraw the canvas during the operation as that can remarkably slow down the progress + desktop()->getCanvas()->_drawing_disabled = true; BoolOpErrors returnCode = ObjectSet::pathBoolOp(bop, true, true); + desktop()->getCanvas()->_drawing_disabled = false; + switch(returnCode) { case ERR_TOO_LESS_PATHS_1: boolop_display_error_message(desktop(), _("Select <b>at least 1 path</b> to perform a boolean union.")); |
