summaryrefslogtreecommitdiffstats
path: root/src/widgets/text-toolbar.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-09-18 12:21:58 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-09-18 12:21:58 +0000
commit64ca7777062dde4c20c3535a21317e74f487eda7 (patch)
treee9d51d42c2620e8742a4886e99c0491037d3ed5b /src/widgets/text-toolbar.cpp
parentFix for 818628 : DBUS Metadata for error domain warning when using File>New (diff)
downloadinkscape-64ca7777062dde4c20c3535a21317e74f487eda7.tar.gz
inkscape-64ca7777062dde4c20c3535a21317e74f487eda7.zip
Fix for 168164 : Fix precision of font size
(bzr r11675)
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
-rw-r--r--src/widgets/text-toolbar.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index dcfd109d8..db9abc4c8 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -1222,13 +1222,16 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
double size = sp_style_css_size_px_to_units(query->font_size.computed, unit);
- gchar size_text[G_ASCII_DTOSTR_BUF_SIZE];
- g_ascii_dtostr (size_text, sizeof (size_text), size);
+ //gchar size_text[G_ASCII_DTOSTR_BUF_SIZE];
+ //g_ascii_dtostr (size_text, sizeof (size_text), size);
+
+ Inkscape::CSSOStringStream os;
+ os << size;
Ink_ComboBoxEntry_Action* fontSizeAction =
INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontSizeAction" ) );
sp_text_set_sizes(GTK_LIST_STORE(ink_comboboxentry_action_get_model(fontSizeAction)), unit);
- ink_comboboxentry_action_set_active_text( fontSizeAction, size_text );
+ ink_comboboxentry_action_set_active_text( fontSizeAction, os.str().c_str() );
Glib::ustring tooltip = Glib::ustring::format("Font size (", sp_style_get_css_unit_string(unit), ")");
ink_comboboxentry_action_set_tooltip ( fontSizeAction, tooltip.c_str());