summaryrefslogtreecommitdiffstats
path: root/src/widgets/measure-toolbar.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-10-12 10:37:15 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-10-12 10:37:15 +0000
commit2653fd7c3a138f91181f7bb64e1fd342c943ee7b (patch)
tree208c04e67468b39db595cdb539ed3914a7c9d7af /src/widgets/measure-toolbar.cpp
parentupdate to trunk (diff)
downloadinkscape-2653fd7c3a138f91181f7bb64e1fd342c943ee7b.tar.gz
inkscape-2653fd7c3a138f91181f7bb64e1fd342c943ee7b.zip
Convert Measure to Item done
(bzr r14393.1.17)
Diffstat (limited to 'src/widgets/measure-toolbar.cpp')
-rw-r--r--src/widgets/measure-toolbar.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index 9c782b4b6..48c781fb3 100644
--- a/src/widgets/measure-toolbar.cpp
+++ b/src/widgets/measure-toolbar.cpp
@@ -178,6 +178,13 @@ static void sp_to_mark_dimension(void){
}
}
+static void sp_to_item(void){
+ MeasureTool *mt = get_measure_tool();
+ if (mt) {
+ mt->toItem();
+ }
+}
+
void sp_measure_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, GObject* holder)
{
UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR);
@@ -283,6 +290,16 @@ void sp_measure_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, G
g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_to_mark_dimension), 0 );
gtk_action_group_add_action( mainActions, GTK_ACTION(act) );
}
+ //to item
+ {
+ InkAction* act = ink_action_new( "MeasureToItem",
+ _("Convert to item"),
+ _("Convert to item"),
+ INKSCAPE_ICON("path-reverse"),
+ secondarySize );
+ g_signal_connect_after( G_OBJECT(act), "activate", G_CALLBACK(sp_to_item), 0 );
+ gtk_action_group_add_action( mainActions, GTK_ACTION(act) );
+ }
} // end of sp_measure_toolbox_prep()