summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/shemov.cpp b/shemov.cpp
index f00caf5..8009daf 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -61,6 +61,8 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
connect(mATree, SIGNAL(needWindowTitleChange(QString)), this, SLOT(setWindowTitle(QString)));
connect(mATree->filesWidget()->filesTree()->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), this, SLOT(updateSelectionCount(const QItemSelection &, const QItemSelection &)));
connect(mATree->seriesWidget()->seriesTree()->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(updateSelectionCount(QItemSelection,QItemSelection)));
+ connect(this, SIGNAL(configChanged()), mATree->seriesWidget()->seriesTree(), SLOT(readConfig()));
+ connect(this, SIGNAL(configChanged()), mATree->filesWidget()->filesTree(), SLOT(readConfig()));
//newmoviewizard
mNewMovieWizard = new NewMovieWizard(this);
@@ -83,14 +85,15 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla
connect(mFSWidget->dirModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(setFsFree()));
connect(mFSWidget->dirModel(), SIGNAL(layoutChanged()), this, SLOT(setFsFree()));
connect(mFSWidget->dirModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(setFsFree()));
+ connect(this, SIGNAL(configChanged()), mFSWidget->fileView(), SLOT(readConfig()));
QWidget *centralWidget = new QWidget;
centralWidget->setLayout(mainLayout);
setCentralWidget(centralWidget);
+ show();
mATree->seriesWidget()->readSettings();
mFSWidget->readSettings();
readSettings();
- show();
mFSWidget->fileView()->setFocus(Qt::ActiveWindowFocusReason);
}
@@ -142,8 +145,7 @@ void SheMov::configure(){
dlg.exec();
createOpenWithMenuFS();
createOpenWithMenuAV();
- mATree->seriesWidget()->seriesTree()->readConfig();
- mATree->filesWidget()->filesTree()->readConfig();
+ emit configChanged();
}
void SheMov::tabChanged(int newTab){
@@ -606,6 +608,10 @@ void SheMov::readSettings(){
if(winState){
setWindowState(Qt::WindowMaximized);
}
+ int currentTab = s.value("ui/selectedtab", 0).toInt();
+ if(currentTab < mTab->count() && currentTab != mTab->currentIndex()){
+ mTab->setCurrentIndex(currentTab);
+ }
int filesMode = s.value("ui/filestreemode", FilesTreeModel::Normal).toInt();
switch(filesMode){
case FilesTreeModel::Normal: