diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-12-20 22:51:23 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-12-20 22:51:23 +0000 |
| commit | c9879d7327cb644dbc06d1b37d0b7eb5813c4d83 (patch) | |
| tree | 9f1631a1eea056badc2308a68d2f4518fcffcf47 /src | |
| parent | Merge branch 'patch-2' of gitlab.com:Moini/inkscape (diff) | |
| parent | Accelerate boolean path operation for larger paths by disabling redrawing the... (diff) | |
| download | inkscape-c9879d7327cb644dbc06d1b37d0b7eb5813c4d83.tar.gz inkscape-c9879d7327cb644dbc06d1b37d0b7eb5813c4d83.zip | |
Merge branch 'break-apart-speedup' of gitlab.com:ollip/inkscape
Diffstat (limited to 'src')
| -rw-r--r-- | src/path-chemistry.cpp | 10 | ||||
| -rw-r--r-- | src/splivarot.cpp | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 9a1d67e16..b58fa4f15 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -32,6 +32,7 @@ #include "verbs.h" #include "display/curve.h" +#include "display/sp-canvas.h" #include "object/box3d.h" #include "object/object-set.h" @@ -207,7 +208,8 @@ ObjectSet::breakApart(bool skip_undo) desktop()->messageStack()->flash(Inkscape::IMMEDIATE_MESSAGE, _("Breaking apart paths...")); // set "busy" cursor desktop()->setWaitingCursor(); - + // disable redrawing during the break-apart operation for remarkable speedup for large paths + desktop()->getCanvas()->_drawing_disabled = true; } bool did = false; @@ -281,9 +283,11 @@ ObjectSet::breakApart(bool skip_undo) g_free(style); g_free(path_effect); } - - if(desktop()) + + if (desktop()) { + desktop()->getCanvas()->_drawing_disabled = false; desktop()->clearWaitingCursor(); + } if (did) { if ( !skip_undo ) { diff --git a/src/splivarot.cpp b/src/splivarot.cpp index f3e406599..82b7326f8 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.")); |
