diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2014-09-02 22:41:43 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2014-09-02 22:41:43 +0000 |
| commit | 874dd8d911c8120f0c9537a3784dfad1a7a362b6 (patch) | |
| tree | cf0d5acaacfac1cbda7570af35c50c8ca535355d /src | |
| parent | Simplify nested structure of launcher scripts (needs testing) (diff) | |
| parent | Fix locale issue in powerstroke width selection (diff) | |
| download | inkscape-874dd8d911c8120f0c9537a3784dfad1a7a362b6.tar.gz inkscape-874dd8d911c8120f0c9537a3784dfad1a7a362b6.zip | |
update to trunk (r13542)
(bzr r13506.1.56)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/tools/freehand-base.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index a90a23a3e..37a170bc9 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -247,8 +247,9 @@ static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points sp_style_unref(style); } - char * width_str = new char[50]; - sprintf(width_str, "0,%f", stroke_width / 2.); + std::ostringstream s; + s.imbue(std::locale::classic()); + s << "0," << stroke_width / 2.; // write powerstroke parameters: lpe->getRepr()->setAttribute("start_linecap_type", "zerowidth"); @@ -257,9 +258,7 @@ static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points lpe->getRepr()->setAttribute("sort_points", "true"); lpe->getRepr()->setAttribute("interpolator_type", "CubicBezierJohan"); lpe->getRepr()->setAttribute("interpolator_beta", "0.2"); - lpe->getRepr()->setAttribute("offset_points", width_str); - - delete [] width_str; + lpe->getRepr()->setAttribute("offset_points", s.str().c_str()); } static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, SPCurve *curve) |
