summaryrefslogtreecommitdiffstats
path: root/src/inkscape-application.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-11-27 16:18:45 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-11-27 16:18:45 +0000
commit2b769cc45cc030a4a3947e22daa174cf28bf57de (patch)
tree52e04bdd7ce6d9cbc9e6d718196e9b14f7992729 /src/inkscape-application.cpp
parentComment out debugging output. (diff)
downloadinkscape-2b769cc45cc030a4a3947e22daa174cf28bf57de.tar.gz
inkscape-2b769cc45cc030a4a3947e22daa174cf28bf57de.zip
Add a rotation action.
Diffstat (limited to 'src/inkscape-application.cpp')
-rw-r--r--src/inkscape-application.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/inkscape-application.cpp b/src/inkscape-application.cpp
index fc2fbbe76..cf442ecbc 100644
--- a/src/inkscape-application.cpp
+++ b/src/inkscape-application.cpp
@@ -24,6 +24,7 @@
#include "actions/actions-base.h" // Actions
#include "actions/actions-output.h" // Actions
#include "actions/actions-selection.h" // Actions
+#include "actions/actions-transform.h" // Actions
#ifdef WITH_DBUS
# include "extension/dbus/dbus-init.h"
@@ -65,6 +66,7 @@ InkscapeApplication::InkscapeApplication()
add_actions_base(this); // actions that are GUI independent
add_actions_output(this); // actions for file export
add_actions_selection(this); // actions for object selection
+ add_actions_transform(this); // actions for transforming selected objects
// ====================== Command Line ======================
@@ -162,6 +164,16 @@ InkscapeApplication::get_active_document()
return _documents.back();
}
+Inkscape::Selection*
+InkscapeApplication::get_active_selection()
+{
+ // This should change based on last document window in focus if with GUI. But for now we're
+ // only using it for command line mode so return last document (the one currently be read in).
+ SPDocument* document = _documents.back();
+ Inkscape::ActionContext context = INKSCAPE.action_context_for_document(document);
+ return context.getSelection();
+}
+
void
InkscapeApplication::on_startup()
{