[QGIS Commit] r14231 - trunk/qgis/src/app/attributetable

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Sep 15 09:59:09 EDT 2010


Author: timlinux
Date: 2010-09-15 13:59:09 +0000 (Wed, 15 Sep 2010)
New Revision: 14231

Modified:
   trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp
Log:
Fix for #889 - show selection count in atribute table dialog

Modified: trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp
===================================================================
--- trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp	2010-09-15 12:21:52 UTC (rev 14230)
+++ trunk/qgis/src/app/attributetable/qgsattributetabledialog.cpp	2010-09-15 13:59:09 UTC (rev 14231)
@@ -81,7 +81,8 @@
     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 @@
 
   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 @@
     }
 
     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 @@
     }
   }
   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 )



More information about the QGIS-commit mailing list