summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/measure-toolbar.cpp18
-rw-r--r--src/widgets/toolbox.cpp1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index f48dcd4e0..9bab3ad4a 100644
--- a/src/widgets/measure-toolbar.cpp
+++ b/src/widgets/measure-toolbar.cpp
@@ -242,6 +242,14 @@ sp_to_guides(void){
}
static void
+sp_to_phantom(void){
+ MeasureTool *mt = get_measure_tool();
+ if (mt) {
+ mt->toPhantom();
+ }
+}
+
+static void
sp_to_item(void){
MeasureTool *mt = get_measure_tool();
if (mt) {
@@ -381,6 +389,16 @@ void sp_measure_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, G
g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_reverse_knots), 0 );
gtk_action_group_add_action( mainActions, GTK_ACTION(act) );
}
+ /* phantom measure */
+ {
+ InkAction* act = ink_action_new( "MeasureToPhantom",
+ _("Phantom measure"),
+ _("Phantom measure"),
+ INKSCAPE_ICON("selection-make-bitmap-copy"),
+ secondarySize );
+ g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_to_phantom), 0 );
+ gtk_action_group_add_action( mainActions, GTK_ACTION(act) );
+ }
/* to guides */
{
InkAction* act = ink_action_new( "MeasureToGuides",
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index edee612e5..88dc7a190 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -375,6 +375,7 @@ static gchar const * ui_descr =
" <toolitem action='MeasureOnlyVisible' />"
" <toolitem action='MeasureAllLayers' />"
" <toolitem action='MeasureReverse' />"
+ " <toolitem action='MeasureToPhantom' />"
" <toolitem action='MeasureToGuides' />"
" <toolitem action='MeasureMarkDimension' />"
" <toolitem action='MeasureToItem' />"