diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-31 17:13:05 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-31 17:13:05 +0000 |
| commit | 4f80abc6e87ae2783be04e3f8ee5e63ccea0a7dd (patch) | |
| tree | 272f130730fa7c5d8473b6a7638515c263073aa4 /src | |
| parent | Add unit selector for lpe-path-length, too (diff) | |
| download | inkscape-4f80abc6e87ae2783be04e3f8ee5e63ccea0a7dd.tar.gz inkscape-4f80abc6e87ae2783be04e3f8ee5e63ccea0a7dd.zip | |
Make lpe-path_length use TextParamInternal
(bzr r6490)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-path_length.cpp | 6 | ||||
| -rw-r--r-- | src/live_effects/lpe-path_length.h | 2 | ||||
| -rw-r--r-- | src/live_effects/lpe-ruler.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/live_effects/lpe-path_length.cpp b/src/live_effects/lpe-path_length.cpp index 7ff154412..3b9b07c82 100644 --- a/src/live_effects/lpe-path_length.cpp +++ b/src/live_effects/lpe-path_length.cpp @@ -22,7 +22,7 @@ namespace LivePathEffect { LPEPathLength::LPEPathLength(LivePathEffectObject *lpeobject) : Effect(lpeobject), - info_text(_("Info text"), _("Parameter for text creation"), "info_text", &wr, this, ""), + info_text(this), unit(_("Unit"), _("Unit"), "unit", &wr, this) { registerParameter(dynamic_cast<Parameter *>(&info_text)); @@ -44,7 +44,7 @@ LPEPathLength::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p gboolean success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), unit); /* ... set it as the canvas text ... */ - gchar *arc_length = g_strdup_printf("%8.2f %s", lengthval, success ? unit.get_abbreviation() : "px"); + gchar *arc_length = g_strdup_printf("%.2f %s", lengthval, success ? unit.get_abbreviation() : "px"); info_text.param_setValue(arc_length); g_free(arc_length); @@ -56,7 +56,7 @@ LPEPathLength::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p Point c; double area; if (centroid(pwd2_in, c, area)) { - g_print ("Area is zero\n"); + //g_print ("Area is zero\n"); } //g_print ("Area: %f\n", area); diff --git a/src/live_effects/lpe-path_length.h b/src/live_effects/lpe-path_length.h index 63f5ad397..1ec5165e9 100644 --- a/src/live_effects/lpe-path_length.h +++ b/src/live_effects/lpe-path_length.h @@ -31,7 +31,7 @@ public: private: LPEPathLength(const LPEPathLength&); LPEPathLength& operator=(const LPEPathLength&); - TextParam info_text; + TextParamInternal info_text; UnitParam unit; }; diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp index f60c7b9fa..6711fe3f0 100644 --- a/src/live_effects/lpe-ruler.cpp +++ b/src/live_effects/lpe-ruler.cpp @@ -95,7 +95,7 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_i gboolean success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), unit); /* ... set it as the canvas text ... */ - gchar *dist = g_strdup_printf("%8.2f %s", lengthval, success ? unit.get_abbreviation() : "px"); + gchar *dist = g_strdup_printf("%.2f %s", lengthval, success ? unit.get_abbreviation() : "px"); info_text.param_setValue(dist); g_free(dist); |
