diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:55:01 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-05-09 19:42:10 +0000 |
| commit | 61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778 (patch) | |
| tree | 3ed5e5b78b00cf25892a3a18e118eee41cbc15ec /src/extension/internal/grid.cpp | |
| parent | Fix typo (diff) | |
| download | inkscape-61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778.tar.gz inkscape-61cbbcbe02f11d67e4fe9f3c4f452442d2e9f778.zip | |
Start migrating 0.92 patch to master
Diffstat (limited to 'src/extension/internal/grid.cpp')
| -rw-r--r-- | src/extension/internal/grid.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index c7ebf2494..6b3f2efe3 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -86,7 +86,17 @@ Glib::ustring build_lines(Geom::Rect bounding_area, void Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { - Inkscape::Selection * selection = ((SPDesktop *)document)->selection; + SPDesktop *desktop = ((SPDesktop *)document); + Inkscape::Selection * selection = NULL; + if (desktop) { + selection = desktop->getSelection(); + if (selection && !selection->params.empty()) { + selection->restoreBackup(); + if (!desktop->on_live_extension) { + selection->emptyBackup(); + } + } + } Geom::Rect bounding_area = Geom::Rect(Geom::Point(0,0), Geom::Point(100,100)); if (selection->isEmpty()) { |
