glvdebug: minor improvement to timeline so it doesn't try to scrollTo(..) invalid...
authorPeter Lohrmann <peterl@valvesofware.com>
Thu, 12 Feb 2015 23:47:04 +0000 (15:47 -0800)
committerJon Ashburn <jon@lunarg.com>
Tue, 24 Feb 2015 18:52:55 +0000 (11:52 -0700)
* This would cause the timeline to redraw thinking that the item wasn't in view.

tools/glave/src/glvdebug/glvdebug_qtimelineview.cpp

index ab5984c..fa79af2 100755 (executable)
@@ -482,6 +482,11 @@ QRectF glvdebug_QTimelineView::viewportRect(const QModelIndex &index) const
 //-----------------------------------------------------------------------------\r
 void glvdebug_QTimelineView::scrollTo(const QModelIndex &index, ScrollHint hint/* = EnsureVisible*/)\r
 {\r
+    if (!index.isValid())\r
+    {\r
+        return;\r
+    }\r
+\r
     QRect viewRect = viewport()->rect();\r
     QRect itemRect = visualRect(index);\r
 \r