summaryrefslogtreecommitdiffstats
path: root/src/widgets/ruler.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-08-04 22:01:18 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-08-04 22:01:18 +0000
commit6ae6c0bea96eef09907091279e0678aa5f83102d (patch)
tree825708d13704e27c33cb90a5269b25ae390cf4d2 /src/widgets/ruler.cpp
parentFix handling of SVG lengths with spaces [Bug #1208002]. (diff)
downloadinkscape-6ae6c0bea96eef09907091279e0678aa5f83102d.tar.gz
inkscape-6ae6c0bea96eef09907091279e0678aa5f83102d.zip
Switched to global UnitTable.
(bzr r12380.1.62)
Diffstat (limited to 'src/widgets/ruler.cpp')
-rw-r--r--src/widgets/ruler.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp
index 274e1df54..e4e72d86e 100644
--- a/src/widgets/ruler.cpp
+++ b/src/widgets/ruler.cpp
@@ -44,6 +44,7 @@
#define DEFAULT_RULER_FONT_SCALE PANGO_SCALE_X_SMALL
#define MINIMUM_INCR 5
+using Inkscape::Util::unit_table;
enum {
PROP_0,
@@ -258,8 +259,6 @@ sp_ruler_init (SPRuler *ruler)
gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
- Inkscape::Util::UnitTable unit_table;
-
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
priv->unit = new Inkscape::Util::Unit(unit_table.getUnit("px"));
priv->lower = 0;
@@ -380,8 +379,6 @@ sp_ruler_set_property (GObject *object,
SPRuler *ruler = SP_RULER (object);
SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (ruler);
- Inkscape::Util::UnitTable unit_table;
-
switch (prop_id)
{
case PROP_ORIENTATION:
@@ -1189,7 +1186,6 @@ sp_ruler_draw_ticks (SPRuler *ruler)
SPRulerMetric ruler_metric = ruler_metric_general; /* The metric to use for this unit system */
PangoLayout *layout;
PangoRectangle logical_rect, ink_rect;
- Inkscape::Util::UnitTable unit_table;
if (! gtk_widget_is_drawable (widget))
return;