aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-08-28 07:16:56 -0400
committerKen Moore <moorekou@gmail.com>2015-08-28 07:16:56 -0400
commitb667e1f3aa8e8cc356281e9b247657d0308c58d0 (patch)
treeed6a591692cb847a19c6c41e64fc4b79cd5bf735 /lumina-fm
parentA couple other minor (not-noticable) changes to lumina-fm. (diff)
downloadlumina-b667e1f3aa8e8cc356281e9b247657d0308c58d0.tar.gz
lumina-b667e1f3aa8e8cc356281e9b247657d0308c58d0.tar.bz2
lumina-b667e1f3aa8e8cc356281e9b247657d0308c58d0.zip
Put a few more "stopload" checks into the dir loading routine (after all the items are already loaded - when doing the info updating).
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/widgets/DirWidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp
index 6609a2d8..ce5744e6 100644
--- a/lumina-fm/widgets/DirWidget.cpp
+++ b/lumina-fm/widgets/DirWidget.cpp
@@ -262,7 +262,7 @@ void DirWidget::LoadDir(QString dir, QList<LFileInfo> list){
QTreeWidgetItem *it;
bool addnew = false;
//See if an item already exists for this file
- QList<QTreeWidgetItem*> items = treeWidget->findItems(list[i].fileName(),Qt::MatchExactly,0);
+ QList<QTreeWidgetItem*> items = treeWidget->findItems(list[i].fileName(),Qt::MatchExactly,0); //NOTE: This requires column 0 to be the name
if(items.isEmpty()){
it = new QTreeWidgetItem();
addnew = true;
@@ -337,15 +337,14 @@ void DirWidget::LoadDir(QString dir, QList<LFileInfo> list){
}
ui->actionStopLoad->setVisible(false);
//Another check to ensure the current item is visible
+ if(stopload){ return; } //stop right now
if(showDetails){
if(treeWidget->currentItem()!=0){ treeWidget->scrollToItem(treeWidget->currentItem()); }
for(int t=0; t<treeWidget->columnCount(); t++){treeWidget->resizeColumnToContents(t); }
}else{
if(listWidget->currentItem()!=0){ listWidget->scrollToItem(listWidget->currentItem()); }
}
- //Now Re-enable buttons as necessary
- ui->tool_goToPlayer->setVisible(hasmultimedia);
- ui->tool_goToImages->setVisible(hasimages);
+ if(stopload){ return; } //stop right now
//Assemble any status message
QString stats = QString(tr("Capacity: %1")).arg(LOS::FileSystemCapacity(CDIR));
if(list.length()>0){
@@ -361,6 +360,7 @@ void DirWidget::LoadDir(QString dir, QList<LFileInfo> list){
}
}
+ if(stopload){ return; } //stop right now
ui->label_status->setText( QString(ui->label_status->text()+stats).simplified() );
}
bgstack15