Fix for #889 - show selection count in atribute table dialog

git-svn-id: http://svn.osgeo.org/qgis/trunk@14231 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2010-09-15 13:59:09 +00:00
parent 65835d0f5d
commit e24e567741

View File

@ -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" ) );
@ -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)
{
@ -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;
}
@ -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 )