app: block text buffer signals around copying to the clipboard
so the copying doesn't produce an undo step. Same fix as applied earlier in button_press().
This commit is contained in:
parent
076948b4b7
commit
e9f85b3afc
1 changed files with 19 additions and 0 deletions
|
|
@ -1804,8 +1804,27 @@ gimp_text_tool_copy_clipboard (GimpTextTool *text_tool)
|
|||
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (shell),
|
||||
GDK_SELECTION_CLIPBOARD);
|
||||
|
||||
/* need to block "end-user-action" on the text buffer, because
|
||||
* GtkTextBuffer considers copying text to the clipboard an
|
||||
* undo-relevant user action, which is clearly a bug, but what
|
||||
* can we do...
|
||||
*/
|
||||
g_signal_handlers_block_by_func (text_tool->buffer,
|
||||
gimp_text_tool_buffer_begin_edit,
|
||||
text_tool);
|
||||
g_signal_handlers_block_by_func (text_tool->buffer,
|
||||
gimp_text_tool_buffer_end_edit,
|
||||
text_tool);
|
||||
|
||||
gtk_text_buffer_copy_clipboard (GTK_TEXT_BUFFER (text_tool->buffer),
|
||||
clipboard);
|
||||
|
||||
g_signal_handlers_unblock_by_func (text_tool->buffer,
|
||||
gimp_text_tool_buffer_end_edit,
|
||||
text_tool);
|
||||
g_signal_handlers_unblock_by_func (text_tool->buffer,
|
||||
gimp_text_tool_buffer_begin_edit,
|
||||
text_tool);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue