aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lumina-fm/DirData.h6
-rw-r--r--lumina-fm/MainUI.cpp8
2 files changed, 12 insertions, 2 deletions
diff --git a/lumina-fm/DirData.h b/lumina-fm/DirData.h
index cd5db81a..e759a17a 100644
--- a/lumina-fm/DirData.h
+++ b/lumina-fm/DirData.h
@@ -107,16 +107,19 @@ public:
//Variables
bool showHidden; //Whether hidden files/dirs should be output
bool zfsavailable; //Whether it should even bother looking for ZFS snapshots
+ bool pauseData; //When paused - this will ignore any requests for information (need to manually refresh browsers after unpause)
//Functions
DirData(){
showHidden = false;
zfsavailable = false;
+ pauseData = false;
}
~DirData(){}
-
+
public slots:
void GetDirData(QString ID, QString dirpath){
+ if(pauseData){ return; }
if(DIR_DEBUG){ qDebug() << "GetDirData:" << ID << dirpath; }
//The ID is used when returning the info in a moment
//Make sure to use the canonical path in the HASH search - don't use
@@ -137,6 +140,7 @@ public slots:
}
void GetSnapshotData(QString ID, QString dirpath){
+ if(pauseData){ return; }
if(DIR_DEBUG){ qDebug() << "GetSnapshotData:" << ID << dirpath; }
QString base; QStringList snaps;
//Only check if ZFS is flagged as available
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index 558ecf4d..832fb97e 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -771,6 +771,7 @@ void MainUI::PasteFiles(QString dir, QStringList raw){
}
bool errs = false;
//Perform the copy/move operations
+ worker->pauseData = true; //pause any info requests
if(!copy.isEmpty()){
qDebug() << "Paste Copy:" << copy << "->" << newcopy;
FODialog dlg(this);
@@ -787,6 +788,7 @@ void MainUI::PasteFiles(QString dir, QStringList raw){
dlg.exec();
errs = errs || !dlg.noerrors;
}
+ worker->pauseData = false; //resume info requests
//Modify the clipboard appropriately
if(!errs && !cut.isEmpty()){
//Now clear the clipboard since those old file locations are now invalid
@@ -800,7 +802,7 @@ void MainUI::PasteFiles(QString dir, QStringList raw){
}
}
//Update all the buttons to account for clipboard change
- for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refreshButtons(); }
+ for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refresh(); }
}
void MainUI::FavoriteFiles(QStringList list){
@@ -839,6 +841,7 @@ void MainUI::RenameFiles(QStringList list){
}
}
//Now perform the move
+ //Don't pause the background worker for a simple rename - this operation is extremely fast
qDebug() << "Rename:" << path+fname << "->" << path+nname;
FODialog dlg(this);
dlg.setOverwrite(overwrite);
@@ -865,10 +868,13 @@ void MainUI::RemoveFiles(QStringList list){
//Now remove the file/dir
qDebug() << " - Delete: "<<paths;
+ worker->pauseData = true; //pause any info requests
FODialog dlg(this);
dlg.RemoveFiles(paths);
dlg.show();
dlg.exec();
+ worker->pauseData = false; //resume info requests
+ for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refresh(); }
}
void MainUI::CloseBrowser(QString ID){
bgstack15