summaryrefslogtreecommitdiff
path: root/GstDebugViewer
diff options
context:
space:
mode:
authorRené Stadler <mail@renestadler.de>2012-09-22 01:25:22 +0200
committerRené Stadler <mail@renestadler.de>2012-09-22 01:25:22 +0200
commitd208fb71b0d111eab7a223b0698d6d3f58179827 (patch)
tree9bf70ba8bf8adf7e716edecfb12671c7c7b2acf5 /GstDebugViewer
parentaaa9f40d79e1ac6689e77ec6c79861df7b22b741 (diff)
Fix crash when range filtering
Regression from 25cfe9 (timeline: make log level calculation a lot faster).
Diffstat (limited to 'GstDebugViewer')
-rw-r--r--GstDebugViewer/GUI/models.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/GstDebugViewer/GUI/models.py b/GstDebugViewer/GUI/models.py
index d6482c6..8013195 100644
--- a/GstDebugViewer/GUI/models.py
+++ b/GstDebugViewer/GUI/models.py
@@ -404,7 +404,16 @@ class SubRange (object):
def __getitem__ (self, i):
- return self.l[i + self.start]
+ if isinstance (i, slice):
+ stop = i.stop
+ if stop >= 0:
+ stop += self.start
+ else:
+ stop += self.stop
+
+ return self.l[i.start + self.start:stop]
+ else:
+ return self.l[i + self.start]
def __len__ (self):