From 25e79376cfa1320e4ca910c649c30bfe72774613 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 2 Sep 2015 09:16:08 -0400 Subject: Couple minor adjustments: 1) Move the processEvents call down to every 15 items instead of 20 (just in case a slower system) 2) recalculate the relative snapshot path on every snapshot slider change (fixes a random issue where it uses the previous dir calculation, not the current dir path). --- lumina-fm/widgets/DirWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lumina-fm/widgets/DirWidget.cpp') diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp index 14e7820c..651ceb75 100644 --- a/lumina-fm/widgets/DirWidget.cpp +++ b/lumina-fm/widgets/DirWidget.cpp @@ -357,7 +357,7 @@ void DirWidget::LoadDir(QString dir, QList list){ listWidget->scrollToItem(it); } } - if(i%20==0){ QApplication::processEvents(); }//keep the UI snappy while loading a directory + if(i%15==0){ QApplication::processEvents(); }//keep the UI snappy while loading a directory if(DEBUG){ qDebug() << " - item finished:" << i << time.elapsed(); } } if(DEBUG){ qDebug() << "Done with item loop:" << time.elapsed() << list.length(); } @@ -689,11 +689,11 @@ void DirWidget::on_slider_snap_valueChanged(int val){ dir = normalbasedir; }else{ dir = snapbasedir+snapshots[val]+"/"; - if(snaprelpath.isEmpty()){ + //if(snaprelpath.isEmpty()){ //Need to figure out the relative path within the snapshot snaprelpath = CDIR.section(snapbasedir.section(ZSNAPDIR,0,0), 1,1000); //qDebug() << " - new snapshot-relative path:" << snaprelpath; - } + //} dir.append(snaprelpath); dir.replace("//","/"); //just in case any duplicate slashes from all the split/combining //qDebug() << " - Load Snapshot:" << dir; -- cgit