diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2017-07-05 11:59:04 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2017-07-05 11:59:04 +0000 |
| commit | 32ffd60f10bae1c54df9d38d27471f150148978a (patch) | |
| tree | d6a5c89d7e74035e9714b6671d9776e03fed4faf /src | |
| parent | Clean up color-profile and use io/resource for dir scanning (diff) | |
| download | inkscape-32ffd60f10bae1c54df9d38d27471f150148978a.tar.gz inkscape-32ffd60f10bae1c54df9d38d27471f150148978a.zip | |
Fix 'direction' gui.
Diffstat (limited to 'src')
| -rw-r--r-- | src/desktop-style.cpp | 5 | ||||
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index 4c07c76ea..19582c9ee 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -1157,7 +1157,6 @@ objects_query_fontnumbers (const std::vector<SPItem*> &objects, SPStyle *style_r // FIXME: we must detect MULTIPLE_DIFFERENT for these too style_res->text_anchor.computed = style->text_anchor.computed; - style_res->writing_mode.computed = style->writing_mode.computed; } if (texts == 0) @@ -1394,13 +1393,15 @@ objects_query_writing_modes (const std::vector<SPItem*> &objects, SPStyle *style texts ++; if (set && - ( ( style_res->writing_mode.computed != style->writing_mode.computed ) || + ( ( style_res->writing_mode.computed != style->writing_mode.computed ) || + ( style_res->direction.computed != style->direction.computed ) || ( style_res->text_orientation.computed != style->text_orientation.computed ) ) ) { different = true; // different styles } set = true; style_res->writing_mode.computed = style->writing_mode.computed; + style_res->direction.computed = style->direction.computed; style_res->text_orientation.computed = style->text_orientation.computed; } diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index bf05448eb..272125631 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -1067,7 +1067,7 @@ static void sp_writing_mode_changed( EgeSelectOneAction *act, GObject *tbl ) SPStyle query(SP_ACTIVE_DOCUMENT); int result_numbers = - sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_FONTNUMBERS); + sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_WRITINGMODES); // If querying returned nothing, update default style. if (result_numbers == QUERY_STYLE_NOTHING) @@ -1121,7 +1121,7 @@ static void sp_text_orientation_changed( EgeSelectOneAction *act, GObject *tbl ) SPStyle query(SP_ACTIVE_DOCUMENT); int result_numbers = - sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_FONTNUMBERS); + sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_WRITINGMODES); // If querying returned nothing, update default style. if (result_numbers == QUERY_STYLE_NOTHING) @@ -1150,7 +1150,6 @@ static void sp_text_direction_changed( EgeSelectOneAction *act, GObject *tbl ) g_object_set_data( tbl, "freeze", GINT_TO_POINTER(TRUE) ); int mode = ege_select_one_action_get_active( act ); - SPCSSAttr *css = sp_repr_css_attr_new (); switch (mode) { @@ -1169,7 +1168,7 @@ static void sp_text_direction_changed( EgeSelectOneAction *act, GObject *tbl ) SPStyle query(SP_ACTIVE_DOCUMENT); int result_numbers = - sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_FONTNUMBERS); + sp_desktop_query_style (SP_ACTIVE_DESKTOP, &query, QUERY_STYLE_PROPERTY_WRITINGMODES); // If querying returned nothing, update default style. if (result_numbers == QUERY_STYLE_NOTHING) @@ -1556,7 +1555,6 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/ int activeButton4 = 0; if (query.direction.computed == SP_CSS_DIRECTION_LTR ) activeButton4 = 0; if (query.direction.computed == SP_CSS_DIRECTION_RTL ) activeButton4 = 1; - EgeSelectOneAction* textDirectionAction = EGE_SELECT_ONE_ACTION( g_object_get_data( tbl, "TextDirectionAction" ) ); ege_select_one_action_set_active( textDirectionAction, activeButton4 ); |
