Skip to content

Commit

Permalink
Fix for #889 - show selection count in atribute table dialog
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14231 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Sep 15, 2010
1 parent ef01ed7 commit 3f7d976
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/attributetable/qgsattributetabledialog.cpp
Expand Up @@ -81,7 +81,8 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
QgisApp::instance()->addDockWidget( Qt::BottomDockWidgetArea, mDock );
}

setWindowTitle( tr( "Attribute table - %1 (%n Feature(s))", "feature count", mModel->rowCount() ).arg( mLayer->name() ) );
setWindowTitle( tr ("Attribute table - %3 :: %1 / %2 features(s) selected", "feature count").
arg( mView->selectionModel()->selectedRows().size() ).arg( mModel->rowCount() ).arg( mLayer->name() ));

mRemoveSelectionButton->setIcon( getThemeIcon( "/mActionUnselectAttributes.png" ) );
mSelectedToTopButton->setIcon( getThemeIcon( "/mActionSelectedToTop.png" ) );
Expand Down Expand Up @@ -304,6 +305,8 @@ void QgsAttributeTableDialog::updateSelection()

mSelectionModel->select( selection, QItemSelectionModel::ClearAndSelect );// | QItemSelectionModel::Columns);
mView->setSelectionModel( mSelectionModel );
setWindowTitle( tr ("Attribute table - %3 :: %1 / %2 features(s) selected", "feature count").
arg( mView->selectionModel()->selectedRows().size() ).arg( mModel->rowCount() ).arg( mLayer->name() ));

/*for (int i = 0; i < mModel->rowCount(); ++i)
{
Expand Down Expand Up @@ -351,6 +354,8 @@ void QgsAttributeTableDialog::updateRowSelection( int index )
}

updateRowSelection( first, last, 3 );
setWindowTitle( tr ("Attribute table - %3 :: %1 / %2 features(s) selected", "feature count").
arg( mView->selectionModel()->selectedRows().size() ).arg( mModel->rowCount() ).arg( mLayer->name() ));
mView->setSelectionMode( QAbstractItemView::NoSelection );
return;
}
Expand Down Expand Up @@ -401,6 +406,8 @@ void QgsAttributeTableDialog::updateRowSelection( int index )
}
}
mView->setSelectionMode( QAbstractItemView::NoSelection );
setWindowTitle( tr ("Attribute table - %3 :: %1 / %2 features(s) selected", "feature count").
arg( mView->selectionModel()->selectedRows().size() ).arg( mModel->rowCount() ).arg( mLayer->name() ));
}

void QgsAttributeTableDialog::updateRowSelection( int first, int last, int clickType )
Expand Down

0 comments on commit 3f7d976

Please sign in to comment.