summaryrefslogtreecommitdiffstats
path: root/archivebrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'archivebrowser.cpp')
-rw-r--r--archivebrowser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/archivebrowser.cpp b/archivebrowser.cpp
index 5c919e2..fa72253 100644
--- a/archivebrowser.cpp
+++ b/archivebrowser.cpp
@@ -55,6 +55,7 @@ ArchiveBrowser::ArchiveBrowser(QWidget *parent) : QWidget(parent), mSelectedSize
//connect
connect(mTree->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(browserSelectionChanged(QItemSelection,QItemSelection)));
+ connect(mModel, SIGNAL(populated()), this, SLOT(resetAll()));
//make widget
QVBoxLayout *mainLayout = new QVBoxLayout;
@@ -125,6 +126,7 @@ void ArchiveBrowser::moveToBurn() {
int type = child.data(ArchiveBrowserModel::FileTypeRole).toInt();
QString destination = QString("%1/%2").arg(burnDirS).arg(current.fileName());
if(type == 1){ //movie
+ QFile::rename(current.absoluteFilePath(), destination);
filesToUpdate << child.data(ArchiveBrowserModel::GenericIdRole).toInt();
}else{
QFile::copy(current.absoluteFilePath(), destination);
@@ -134,6 +136,7 @@ void ArchiveBrowser::moveToBurn() {
}
mModel->updateDVDNo(filesToUpdate);
mModel->refresh();
+ mProxy->setBytesRemaining(0);
}
}
@@ -174,6 +177,14 @@ void ArchiveBrowser::setupQualityFilter(){
mQualityFilter->addItems(qualityList);
}
+void ArchiveBrowser::resetAll() {
+ mTree->selectionModel()->clear();
+ mSelectedItems = 0;
+ mSelectedSize = 0;
+ emit sizeChanged(0);
+ emit itemCountChanged(0);
+}
+
QModelIndexList ArchiveBrowser::selectedRows(const QItemSelection &sel){
QModelIndexList retval;
QModelIndexList selIdx = sel.indexes();