prevent traceback when writing in a closed gc control. Fixes #5455
This commit is contained in:
parent
a0fea76ff2
commit
badbe820a1
|
@ -892,6 +892,8 @@ class HtmlTextView(gtk.TextView):
|
||||||
def on_text_buffer_mark_set(self, location, mark, unused_data):
|
def on_text_buffer_mark_set(self, location, mark, unused_data):
|
||||||
bounds = self.get_buffer().get_selection_bounds()
|
bounds = self.get_buffer().get_selection_bounds()
|
||||||
if bounds:
|
if bounds:
|
||||||
|
# textview can be hidden while we add a new line in it.
|
||||||
|
if self.has_screen():
|
||||||
clipboard = self.get_clipboard(gtk.gdk.SELECTION_PRIMARY)
|
clipboard = self.get_clipboard(gtk.gdk.SELECTION_PRIMARY)
|
||||||
clipboard.set_text(self.get_selected_text())
|
clipboard.set_text(self.get_selected_text())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue