summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-07-30 19:59:52 +0200
committerArno <am@disconnect.de>2010-07-30 19:59:52 +0200
commit066cc53c2506fb7f7cb7b3b0d888243df611cacd (patch)
tree73af8e7b7ea17255d95a84b3ee9dcd5d6946c171 /shemov.cpp
parenta493d6500c33a0956e0165ad53136fa6110a7a64 (diff)
downloadSheMov-066cc53c2506fb7f7cb7b3b0d888243df611cacd.tar.gz
SheMov-066cc53c2506fb7f7cb7b3b0d888243df611cacd.tar.bz2
SheMov-066cc53c2506fb7f7cb7b3b0d888243df611cacd.zip
Bugfix commit
The journey through the internals of SheMov started by fixing SeriesTreeWidget::readSettings(). The selected index didn't really get selected on startup because only QItemSelectionModel::setCurrendt() was called. Replace it with QItemSelectionModel::select() and QTreeView::setCurrent(). Also fix SeriesTreeWidget::writeSettings() to only write selected items to QSettings() when something is selected. While working on selections I realized that there is a serious bug in Helper::moveToArchive. The destination directory in the archive must be created if it doesn't exist. For a testcase I needed an easy way to move files back from the archive to incoming directory, so I added FilesTreeWiget::moveToDirectory(). This lets you move files from the FilesTreeWidget to any directory. During testing I realized that SeriesTreeWidget::deleteFromSeries() QMessageBox() doesn't show files when deleting a series part. Fixed that by adding SeriesParts to file list. Finally a newly added SeriesPart gets selected and selected by expanding it first and then calling QItemSelectionModel::select() To make a long story short: 1. fix SeriesTreeWidget::{read,write}Settings 2. add FilesTreeWidget::moveToDirectory() 3. fix SeriesTreeWidget::deleteFromSeries() QMessageBox 4. fix selecting newly added SeriesParts
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/shemov.cpp b/shemov.cpp
index 6c443de..58f2658 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -357,6 +357,8 @@ void SheMov::createActions(){
//Tree FileWidget actions
mMoveToBurnA = new QAction(tr("Move to burn directory"), this);
connect(mMoveToBurnA, SIGNAL(triggered()), mATree->filesWidget(), SLOT(moveToBurn()));
+ mMoveFilesA = new QAction(tr("Move to directory..."), this);
+ connect(mMoveFilesA, SIGNAL(triggered()), mATree->filesWidget(), SLOT(moveToDirectory()));
mSetDvdNoA = new QAction(tr("Set dvd number"), this);
connect(mSetDvdNoA, SIGNAL(triggered()), mATree->filesWidget(), SLOT(setDvdNo()));
mDeleteFilesFromTreeA = new QAction(tr("Delete file(s)..."), this);
@@ -471,6 +473,7 @@ void SheMov::createMenus(){
//ArchiveTreeView fileWidget context menu
mATree->filesWidget()->filesTree()->addAction(mMoveToBurnA);
+ mATree->filesWidget()->filesTree()->addAction(mMoveFilesA);
QAction *sep7 = new QAction(this);
sep7->setSeparator(true);
mATree->filesWidget()->filesTree()->addAction(sep7);