From 8ead1fdd38578da4c61ab5295883073f4548c998 Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Wed, 23 Sep 2009 20:27:22 +0000 Subject: Fix for 181663 by The Adib. Yay for working Italics button on the toolbar! (bzr r8641) --- src/text-context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/text-context.cpp') diff --git a/src/text-context.cpp b/src/text-context.cpp index c1986972a..e6f4f083b 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -881,10 +881,10 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons if (MOD__CTRL_ONLY && tc->text) { SPStyle const *style = sp_te_style_at_position(tc->text, std::min(tc->text_sel_start, tc->text_sel_end)); SPCSSAttr *css = sp_repr_css_attr_new(); - if (style->font_style.computed == SP_CSS_FONT_STYLE_NORMAL) - sp_repr_css_set_property(css, "font-style", "italic"); - else + if (style->font_style.computed != SP_CSS_FONT_STYLE_NORMAL) sp_repr_css_set_property(css, "font-style", "normal"); + else + sp_repr_css_set_property(css, "font-style", "italic"); sp_te_apply_style(tc->text, tc->text_sel_start, tc->text_sel_end, css); sp_repr_css_attr_unref(css); sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, -- cgit v1.2.3