Skip to content
Permalink
Browse files
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
  • Loading branch information
timlinux committed Sep 15, 2010
1 parent 65835d0 commit e24e567
Showing 1 changed file with 8 additions and 1 deletion.
@@ -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 )

0 comments on commit e24e567

Please sign in to comment.