diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-08-04 22:01:18 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-08-04 22:01:18 +0000 |
| commit | 6ae6c0bea96eef09907091279e0678aa5f83102d (patch) | |
| tree | 825708d13704e27c33cb90a5269b25ae390cf4d2 /src/widgets/select-toolbar.cpp | |
| parent | Fix handling of SVG lengths with spaces [Bug #1208002]. (diff) | |
| download | inkscape-6ae6c0bea96eef09907091279e0678aa5f83102d.tar.gz inkscape-6ae6c0bea96eef09907091279e0678aa5f83102d.zip | |
Switched to global UnitTable.
(bzr r12380.1.62)
Diffstat (limited to 'src/widgets/select-toolbar.cpp')
| -rw-r--r-- | src/widgets/select-toolbar.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index b39423635..e4a5a2905 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -59,6 +59,7 @@ using Inkscape::UI::Widget::UnitTracker; using Inkscape::Util::Unit; using Inkscape::Util::Quantity; using Inkscape::DocumentUndo; +using Inkscape::Util::unit_table; static void sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) @@ -96,7 +97,6 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) tracker->setFullVal( a, keyval[i].val ); } } else { - Inkscape::Util::UnitTable unit_table; for (unsigned i = 0; i < G_N_ELEMENTS(keyval); ++i) { GtkAdjustment *a = GTK_ADJUSTMENT(g_object_get_data(G_OBJECT(spw), keyval[i].key)); gtk_adjustment_set_value(a, Quantity::convert(keyval[i].val, "px", unit)); @@ -192,8 +192,6 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) GtkAdjustment* a_w = GTK_ADJUSTMENT( g_object_get_data( G_OBJECT(spw), "width" ) ); GtkAdjustment* a_h = GTK_ADJUSTMENT( g_object_get_data( G_OBJECT(spw), "height" ) ); - Inkscape::Util::UnitTable unit_table; - if (unit.type == Inkscape::Util::UNIT_TYPE_LINEAR) { x0 = Quantity::convert(gtk_adjustment_get_value(a_x), unit, "px"); y0 = Quantity::convert(gtk_adjustment_get_value(a_y), unit, "px"); @@ -493,7 +491,6 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb // Create the units menu. UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR); - Inkscape::Util::UnitTable unit_table; tracker->addUnit(unit_table.getUnit("%")); tracker->setActiveUnit( sp_desktop_namedview(desktop)->doc_units ); |
