[gimp] Bug 768086: Inconsistent text-layer focusing from text style editor
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 768086: Inconsistent text-layer focusing from text style editor
- Date: Tue, 28 Jun 2016 16:28:39 +0000 (UTC)
commit b37ca78151102e90a9246be5ad4e49e94671f17f
Author: Massimo Valentini <mvalentini src gnome org>
Date: Tue Jun 28 18:15:52 2016 +0200
Bug 768086: Inconsistent text-layer focusing from text style editor
do not place cursor when it is already there
app/tools/gimptexttool-editor.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index 2de63fc..d4d1196 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -309,8 +309,12 @@ gimp_text_tool_editor_button_press (GimpTextTool *text_tool,
switch (press_type)
{
+ GtkTextIter start, end;
+
case GIMP_BUTTON_PRESS_NORMAL:
- gtk_text_buffer_place_cursor (buffer, &cursor);
+ if (gtk_text_buffer_get_selection_bounds (buffer, &start, &end) ||
+ gtk_text_iter_compare (&start, &cursor))
+ gtk_text_buffer_place_cursor (buffer, &cursor);
break;
case GIMP_BUTTON_PRESS_DOUBLE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]