summaryrefslogtreecommitdiffstats
path: root/seriestreewidget.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-07-24 17:21:37 +0200
committerArno <am@disconnect.de>2010-07-24 17:21:37 +0200
commit6e8475d9d3b36dffa41fbb9a5d777d64b3cbc9f6 (patch)
treeaefd8bf062d5464141f9acd571efcf0ea39d83e2 /seriestreewidget.cpp
parentad322157891cec53a7b660629d7c244e75df81d5 (diff)
downloadSheMov-6e8475d9d3b36dffa41fbb9a5d777d64b3cbc9f6.tar.gz
SheMov-6e8475d9d3b36dffa41fbb9a5d777d64b3cbc9f6.tar.bz2
SheMov-6e8475d9d3b36dffa41fbb9a5d777d64b3cbc9f6.zip
Fix bug in SeriesTreeWidget::readSettings()
Select the last selected series with QItemSelectionModel::setCurrentIndex(), otherwise the current index won't be set. On closing the program currentIndex() would be invalid and nothing is selected when starting SheMov again.
Diffstat (limited to 'seriestreewidget.cpp')
-rw-r--r--seriestreewidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/seriestreewidget.cpp b/seriestreewidget.cpp
index ef802f6..a124450 100644
--- a/seriestreewidget.cpp
+++ b/seriestreewidget.cpp
@@ -169,7 +169,7 @@ void SeriesTreeWidget::readSettings(){
QModelIndex seriesIdx = mModel->findValue(selectedSeries);
if(seriesIdx.isValid()){
QModelIndex real = mProxy->mapFromSource(seriesIdx);
- mView->selectionModel()->select(real, QItemSelectionModel::Select);
+ mView->selectionModel()->setCurrentIndex(real, QItemSelectionModel::SelectCurrent);
}
}