Skip to content

Commit e24e567

Browse files
author
timlinux
committedSep 15, 2010
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
1 parent 65835d0 commit e24e567

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎src/app/attributetable/qgsattributetabledialog.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
8181
QgisApp::instance()->addDockWidget( Qt::BottomDockWidgetArea, mDock );
8282
}
8383

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

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

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

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

353356
updateRowSelection( first, last, 3 );
357+
setWindowTitle( tr ("Attribute table - %3 :: %1 / %2 features(s) selected", "feature count").
358+
arg( mView->selectionModel()->selectedRows().size() ).arg( mModel->rowCount() ).arg( mLayer->name() ));
354359
mView->setSelectionMode( QAbstractItemView::NoSelection );
355360
return;
356361
}
@@ -401,6 +406,8 @@ void QgsAttributeTableDialog::updateRowSelection( int index )
401406
}
402407
}
403408
mView->setSelectionMode( QAbstractItemView::NoSelection );
409+
setWindowTitle( tr ("Attribute table - %3 :: %1 / %2 features(s) selected", "feature count").
410+
arg( mView->selectionModel()->selectedRows().size() ).arg( mModel->rowCount() ).arg( mLayer->name() ));
404411
}
405412

406413
void QgsAttributeTableDialog::updateRowSelection( int first, int last, int clickType )

0 commit comments

Comments
 (0)