summaryrefslogtreecommitdiffstats
path: root/seriestreewidget.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-07-29 20:03:26 +0200
committerArno <am@disconnect.de>2010-07-29 20:03:26 +0200
commitd27a1ac45fddeeb4a0bc1220f3858534f5aeca37 (patch)
treef147bdfece2361e0e6c9aff134ba366ce057c805 /seriestreewidget.cpp
parentff8fdb92b8c2dfaa4818150d75c32fc303b438cb (diff)
downloadSheMov-d27a1ac45fddeeb4a0bc1220f3858534f5aeca37.tar.gz
SheMov-d27a1ac45fddeeb4a0bc1220f3858534f5aeca37.tar.bz2
SheMov-d27a1ac45fddeeb4a0bc1220f3858534f5aeca37.zip
Fix selection madness in ArchiveTreeWidget
First try on fixing this. Still use QItemSelectionModel::selectionChanged, but ignore the QItemSelections. Use QItemSelectionModel::selectedRows() instead and compute the seriesPartIds on every change. Hopefully this guarantees having valid QModelIndexes all the time. This fix also obsoletes the quite awkward function SeriesTreeWidget::mapToSource(). Make the QSortProxyModel of SeriesTreeWidget available through SeriesTreeWidget::seriesProxy() instead.
Diffstat (limited to 'seriestreewidget.cpp')
-rw-r--r--seriestreewidget.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/seriestreewidget.cpp b/seriestreewidget.cpp
index 7e5d41f..b5a48be 100644
--- a/seriestreewidget.cpp
+++ b/seriestreewidget.cpp
@@ -70,18 +70,6 @@ SeriesTreeWidget::SeriesTreeWidget(QWidget *parent) : QWidget(parent){
}
-QModelIndexList SeriesTreeWidget::mapToSource(const QModelIndexList &indexes) const{
- QModelIndexList retval;
- foreach(QModelIndex i, indexes){
- retval << mProxy->mapToSource(i);
- }
- return retval;
-}
-
-QModelIndex SeriesTreeWidget::mapToSource(const QModelIndex &index) const{
- return mProxy->mapToSource(index);
-}
-
void SeriesTreeWidget::newSeries(){
QList<QVariant> data;
data << tr("<New series>") << QVariant() << QVariant() << QVariant() << SeriesTreeModel::NewSeries;