From 8d34ae34135cfd495556a059c449a5f11ca6212c Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 13 Jul 2013 10:10:46 +0200 Subject: - some fixes to the refreshing behaviour - "fix" buttons in problems dialog are now actually functional - python proxy now has diagnosis functionality to warn user if correct proxy version is not available - python proxy now has a configurable python path --- src/qtgroupingproxy.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/qtgroupingproxy.cpp') diff --git a/src/qtgroupingproxy.cpp b/src/qtgroupingproxy.cpp index f62d45d3..45ff192b 100644 --- a/src/qtgroupingproxy.cpp +++ b/src/qtgroupingproxy.cpp @@ -215,10 +215,7 @@ QtGroupingProxy::buildTree() QList QtGroupingProxy::addSourceRow( const QModelIndex &idx ) { - // TODO: modeltest reports a discrepance between the "rowAboutToBeInserted" and "rowInserted" events - QList updatedGroups; - QList groupData = belongsTo( idx ); //an empty list here means it's supposed to go in root. @@ -265,7 +262,6 @@ QtGroupingProxy::addSourceRow( const QModelIndex &idx ) updatedGroups << updatedGroup; } - //update m_groupHash to the new source-model layout (one row added) QMutableHashIterator > i( m_groupHash ); while( i.hasNext() ) @@ -290,9 +286,7 @@ QtGroupingProxy::addSourceRow( const QModelIndex &idx ) if( updatedGroups.contains( i.key() ) ) { //the row needs to be added to this group - beginInsertRows( index( i.key() ), insertedProxyRow, insertedProxyRow ); groupList.insert( insertedProxyRow, idx.row() ); - endInsertRows(); } } @@ -337,11 +331,13 @@ QModelIndex QtGroupingProxy::index( int row, int column, const QModelIndex &parent ) const { // qDebug() << "index requested for: (" << row << "," << column << "), " << parent; - if( !hasIndex(row, column, parent) ) + if( !hasIndex(row, column, parent) ) { return QModelIndex(); + } - if( parent.column() > 0 ) + if( parent.column() > 0 ) { return QModelIndex(); + } /* We save the instructions to make the parent of the index in a struct. * The place of the struct in the list is stored in the internalId -- cgit v1.3.1