diff options
author | Arno <am@disconnect.de> | 2010-07-29 20:03:26 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-07-29 20:03:26 +0200 |
commit | d27a1ac45fddeeb4a0bc1220f3858534f5aeca37 (patch) | |
tree | f147bdfece2361e0e6c9aff134ba366ce057c805 /seriestreewidget.h | |
parent | ff8fdb92b8c2dfaa4818150d75c32fc303b438cb (diff) | |
download | SheMov-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.h')
-rw-r--r-- | seriestreewidget.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/seriestreewidget.h b/seriestreewidget.h index fd850b4..578edef 100644 --- a/seriestreewidget.h +++ b/seriestreewidget.h @@ -28,8 +28,7 @@ class SeriesTreeWidget : public QWidget { public: explicit SeriesTreeWidget(QWidget *parent = 0); SeriesTreeView *seriesTree() { return mView; } - QModelIndexList mapToSource(const QModelIndexList &indexes) const; - QModelIndex mapToSource(const QModelIndex &index) const; + SeriesTreeSortModel *seriesProxy() { return mProxy; } public slots: void newSeries(); |