mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
Fix crash when copying row to clipboard
This commit is contained in:
parent
b3960cf8e0
commit
a83c471d00
1 changed files with 7 additions and 4 deletions
|
@ -611,11 +611,14 @@ class Window (object):
|
||||||
@action
|
@action
|
||||||
def handle_edit_copy_line_action_activate (self, action):
|
def handle_edit_copy_line_action_activate (self, action):
|
||||||
|
|
||||||
# TODO: Should probably copy the _exact_ line as taken from the file.
|
line_index = self.get_active_line_index ()
|
||||||
|
model = self.log_view.get_model ()
|
||||||
|
line_offset = model.line_offsets[line_index]
|
||||||
|
|
||||||
line = self.get_active_line ()
|
line_text = model.access_offset (line_offset).strip ()
|
||||||
log_line = Data.LogLine (line)
|
line_text = Data.strip_escape (line_text)
|
||||||
self.clipboard.set_text (log_line.line_string ())
|
|
||||||
|
self.clipboard.set_text (line_text)
|
||||||
|
|
||||||
@action
|
@action
|
||||||
def handle_edit_copy_message_action_activate (self, action):
|
def handle_edit_copy_message_action_activate (self, action):
|
||||||
|
|
Loading…
Reference in a new issue