aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm/widgets/DirWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-08-27 07:01:36 -0400
committerKen Moore <moorekou@gmail.com>2015-08-27 07:01:36 -0400
commitca9db2c0fa7f5d1a2dcd9272d07f62360c73031c (patch)
tree863c51ff5f271c7adb248317cb0d5770ab482440 /lumina-fm/widgets/DirWidget.cpp
parentFix the mimetype display for directories in lumina-fileinfo. (diff)
downloadlumina-ca9db2c0fa7f5d1a2dcd9272d07f62360c73031c.tar.gz
lumina-ca9db2c0fa7f5d1a2dcd9272d07f62360c73031c.tar.bz2
lumina-ca9db2c0fa7f5d1a2dcd9272d07f62360c73031c.zip
Ensure that the current directory loading is stopped when starting to load a new directory.
Diffstat (limited to 'lumina-fm/widgets/DirWidget.cpp')
-rw-r--r--lumina-fm/widgets/DirWidget.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp
index b13b73fa..256722d7 100644
--- a/lumina-fm/widgets/DirWidget.cpp
+++ b/lumina-fm/widgets/DirWidget.cpp
@@ -61,6 +61,7 @@ DirWidget::~DirWidget(){
}
void DirWidget::ChangeDir(QString dirpath){
+ stopload = true; //just in case it is still loading
emit LoadDirectory(ID, dirpath);
}
@@ -454,6 +455,7 @@ void DirWidget::on_tool_act_run_clicked(){
}
}
if(!dirs.isEmpty()){
+ stopload = true; //just in case it is still loading
emit LoadDirectory(ID, dirs.takeFirst()); //load the first directory in this widget
}
if(!dirs.isEmpty()){
@@ -587,6 +589,7 @@ void DirWidget::on_slider_snap_valueChanged(int val){
}
if(dir.isEmpty()){ return; }
//Load the newly selected snapshot
+ stopload = true; //just in case it is still loading
emit LoadDirectory(ID, dir);
}
@@ -597,6 +600,7 @@ void DirWidget::on_actionBack_triggered(){
if(dir == normalbasedir){
dir = history.last();
}
+ stopload = true; //just in case it is still loading
emit LoadDirectory(ID, dir);
}
@@ -606,10 +610,12 @@ void DirWidget::on_actionUp_triggered(){
while(!QFile::exists(dir) && !dir.isEmpty()){
dir = dir.section("/",0,-2); //back up one additional dir
}
+ stopload = true; //just in case it is still loading
emit LoadDirectory(ID, dir);
}
void DirWidget::on_actionHome_triggered(){
+ stopload = true; //just in case it is still loading
emit LoadDirectory(ID, QDir::homePath());
}
@@ -624,6 +630,7 @@ void DirWidget::dir_changed(){
while(!QFile::exists(dir) && !dir.isEmpty()){
dir = dir.section("/",0,-2); //back up one additional dir
}
+ stopload = true; //just in case it is still loading
emit LoadDirectory(ID, dir);
}
bgstack15