summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/originalpath.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2012-01-12 21:21:03 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2012-01-12 21:21:03 +0000
commitd4f5520e19556b947a33eed0f7e2a99fa88de9fa (patch)
tree9421938a4832ae262b458cf84ddefd736072eac2 /src/live_effects/parameter/originalpath.cpp
parentLPE: add new LPE that outputs the original path data. used to make a clone (w... (diff)
downloadinkscape-d4f5520e19556b947a33eed0f7e2a99fa88de9fa.tar.gz
inkscape-d4f5520e19556b947a33eed0f7e2a99fa88de9fa.zip
LPE: originalpath parameters: implement select original button
(bzr r10875)
Diffstat (limited to 'src/live_effects/parameter/originalpath.cpp')
-rw-r--r--src/live_effects/parameter/originalpath.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/live_effects/parameter/originalpath.cpp b/src/live_effects/parameter/originalpath.cpp
index 3092f678b..4cb7fc4e4 100644
--- a/src/live_effects/parameter/originalpath.cpp
+++ b/src/live_effects/parameter/originalpath.cpp
@@ -16,6 +16,10 @@
#include "display/curve.h"
#include "live_effects/effect.h"
+#include "inkscape.h"
+#include "desktop-handles.h"
+#include "selection.h"
+
namespace Inkscape {
namespace LivePathEffect {
@@ -100,8 +104,14 @@ OriginalPathParam::linked_modified_callback(SPObject *linked_obj, guint /*flags*
void
OriginalPathParam::on_select_original_button_click()
{
- /// \todo select original path
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
SPItem *original = ref.getObject();
+ if (desktop == NULL || original == NULL) {
+ return;
+ }
+ Inkscape::Selection *selection = sp_desktop_selection(desktop);
+ selection->clear();
+ selection->set(original);
}
} /* namespace LivePathEffect */