diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-10-12 10:37:15 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-10-12 10:37:15 +0000 |
| commit | 2653fd7c3a138f91181f7bb64e1fd342c943ee7b (patch) | |
| tree | 208c04e67468b39db595cdb539ed3914a7c9d7af /src/widgets | |
| parent | update to trunk (diff) | |
| download | inkscape-2653fd7c3a138f91181f7bb64e1fd342c943ee7b.tar.gz inkscape-2653fd7c3a138f91181f7bb64e1fd342c943ee7b.zip | |
Convert Measure to Item done
(bzr r14393.1.17)
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/measure-toolbar.cpp | 17 | ||||
| -rw-r--r-- | src/widgets/toolbox.cpp | 1 |
2 files changed, 18 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() diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 3daa3c467..665502745 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -348,6 +348,7 @@ static gchar const * ui_descr = " <toolitem action='MeasureAllLayers' />" " <toolitem action='MeasureReverse' />" " <toolitem action='MeasureMarkDimension' />" + " <toolitem action='MeasureToItem' />" " </toolbar>" " <toolbar name='StarToolbar'>" |
