mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
Avoid copies of the line index list in the line view model (fixes range filtering)
This commit is contained in:
parent
a583af7596
commit
3cfcc8e635
1 changed files with 7 additions and 0 deletions
|
@ -1007,6 +1007,11 @@ class LineViewLogModel (FilteredLogModel):
|
|||
self.line_offsets = []
|
||||
self.line_levels = []
|
||||
|
||||
def reset (self):
|
||||
|
||||
del self.line_offsets[:]
|
||||
del self.line_levels[:]
|
||||
|
||||
def insert_line (self, position, parent_line_index):
|
||||
|
||||
if position == -1:
|
||||
|
@ -1117,6 +1122,8 @@ class LineView (object):
|
|||
line_index = model.parent_line_index (path[0])
|
||||
|
||||
line_model = self.line_view.props.model
|
||||
if line_model is None:
|
||||
return
|
||||
if len (line_model) == 0:
|
||||
line_model.insert_line (0, line_index)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue