mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
degbug-viewer: models: only temporarilly modify the row for filtering
This avoid that we have to chek the type in the getter. Also update the comment - we need the strip since the readline call will not strip the newline.
This commit is contained in:
parent
d44c317da7
commit
561c612472
1 changed files with 5 additions and 4 deletions
|
@ -76,8 +76,10 @@ class LogModelBase (Common.GUI.GenericTreeModel):
|
|||
row = line_cache[offset]
|
||||
# adjust special rows
|
||||
row[COL_LEVEL] = line_levels[i]
|
||||
row[COL_MESSAGE] = access_offset(offset + row[COL_MESSAGE])
|
||||
msg_offset = row[COL_MESSAGE]
|
||||
row[COL_MESSAGE] = access_offset(offset + msg_offset)
|
||||
yield (row, offset,)
|
||||
row[COL_MESSAGE] = msg_offset
|
||||
|
||||
def on_get_flags(self):
|
||||
|
||||
|
@ -130,9 +132,8 @@ class LogModelBase (Common.GUI.GenericTreeModel):
|
|||
|
||||
value = self.line_cache[line_offset][col_id]
|
||||
if col_id == self.COL_MESSAGE:
|
||||
message_offset = value
|
||||
# TODO: correct the message offset to avodi the strip() calls
|
||||
value = self.access_offset(line_offset + message_offset).strip()
|
||||
# strip whitespace + newline
|
||||
value = self.access_offset(line_offset + value).strip()
|
||||
|
||||
return value
|
||||
|
||||
|
|
Loading…
Reference in a new issue