[gimp] Fixed when texttool popup is shown first, it does not have current text direction.



commit ee468b002461215d2b7ac974c519881a3bcca7b9
Author: ONO Yoshio <ohtsuka yoshio gmail com>
Date:   Wed Aug 1 12:14:54 2018 +0900

    Fixed when texttool popup is shown first, it does not have current text direction.

 app/actions/text-tool-actions.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/app/actions/text-tool-actions.c b/app/actions/text-tool-actions.c
index 66f9746cfb..307d2b5aba 100644
--- a/app/actions/text-tool-actions.c
+++ b/app/actions/text-tool-actions.c
@@ -176,6 +176,8 @@ text_tool_actions_update (GimpActionGroup *group,
   gboolean          clip       = FALSE;   /* clipboard has text available */
   gboolean          input_method_menu;
   gboolean          unicode_menu;
+  GimpTextDirection direction;
+  gint              i;
 
   layer = gimp_image_get_active_layer (image);
 
@@ -213,5 +215,15 @@ text_tool_actions_update (GimpActionGroup *group,
   SET_SENSITIVE ("text-tool-text-to-path",    text_layer);
   SET_SENSITIVE ("text-tool-text-along-path", text_layer && vectors);
 
+  direction = gimp_text_tool_get_direction (text_tool);
+  for (i = 0; i < G_N_ELEMENTS (text_tool_direction_actions); i++)
+    {
+      if (direction == text_tool_direction_actions[i].value)
+        {
+          SET_ACTIVE (text_tool_direction_actions[i].name, TRUE);
+          break;
+        }
+    }
+
   SET_VISIBLE ("text-tool-input-methods-menu", input_method_menu);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]