diff options
author | René Stadler <mail@renestadler.de> | 2012-09-26 01:41:22 +0200 |
---|---|---|
committer | René Stadler <mail@renestadler.de> | 2012-09-26 01:41:22 +0200 |
commit | 5f40f4a8be87f46aa9a07271785caacb6d111595 (patch) | |
tree | bb42d982f7186793cf4c1f2329c6839ad48c3865 /GstDebugViewer/GUI | |
parent | 56eec9e2507a5e4d951b6a82e8d6d89b45ffca06 (diff) |
Fix crash when copying row to clipboard
Diffstat (limited to 'GstDebugViewer/GUI')
-rw-r--r-- | GstDebugViewer/GUI/window.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/GstDebugViewer/GUI/window.py b/GstDebugViewer/GUI/window.py index bad88c7..b025fb1 100644 --- a/GstDebugViewer/GUI/window.py +++ b/GstDebugViewer/GUI/window.py @@ -611,11 +611,14 @@ class Window (object): @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_text = model.access_offset (line_offset).strip () + line_text = Data.strip_escape (line_text) - line = self.get_active_line () - log_line = Data.LogLine (line) - self.clipboard.set_text (log_line.line_string ()) + self.clipboard.set_text (line_text) @action def handle_edit_copy_message_action_activate (self, action): |