From a98f4fb9c417329313d5c6c644143489de129fac Mon Sep 17 00:00:00 2001 From: Peter Lohrmann Date: Thu, 12 Feb 2015 15:47:04 -0800 Subject: [PATCH] glvdebug: minor improvement to timeline so it doesn't try to scrollTo(..) invalid items. * This would cause the timeline to redraw thinking that the item wasn't in view. --- tools/glave/src/glvdebug/glvdebug_qtimelineview.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/glave/src/glvdebug/glvdebug_qtimelineview.cpp b/tools/glave/src/glvdebug/glvdebug_qtimelineview.cpp index ab5984c..fa79af2 100755 --- a/tools/glave/src/glvdebug/glvdebug_qtimelineview.cpp +++ b/tools/glave/src/glvdebug/glvdebug_qtimelineview.cpp @@ -482,6 +482,11 @@ QRectF glvdebug_QTimelineView::viewportRect(const QModelIndex &index) const //----------------------------------------------------------------------------- void glvdebug_QTimelineView::scrollTo(const QModelIndex &index, ScrollHint hint/* = EnsureVisible*/) { + if (!index.isValid()) + { + return; + } + QRect viewRect = viewport()->rect(); QRect itemRect = visualRect(index); -- 2.7.4