From 511d1f9cd61586336014c55e32f67872e5e4ee10 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 6 Apr 2013 06:12:00 +0200 Subject: Put duration and size in one Field (SmDirModel) Consolidate duration and size in one Field, like in the archive, to be consistent. Also rename the Role and Field accordingly. --- smtreeview.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'smtreeview.cpp') diff --git a/smtreeview.cpp b/smtreeview.cpp index feb64bf..36d7c07 100644 --- a/smtreeview.cpp +++ b/smtreeview.cpp @@ -28,6 +28,10 @@ void SmTreeView::readHeaderConfig(){ headerActions.insert(a->data().toInt(), a); } for(int i = 0; i < hv->count(); ++i){ + // don't crash if header count is smaller than saved... + if(i >= mHeaderGroup->actions().count()){ + continue; + } if(!hv->isSectionHidden(i)){ headerActions.value(i)->setChecked(true); } -- cgit v1.2.3-70-g09d2