fixed a problem in attribute table: selection was not getting updated correctly when showing only selected features.

Patch by Vita Cizek.


git-svn-id: http://svn.osgeo.org/qgis/trunk@10784 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
wonder 2009-05-13 13:04:27 +00:00
parent ece7a72101
commit a32cd601d2

View File

@ -103,12 +103,12 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
connect( mView->verticalHeader(), SIGNAL( sectionClicked( int ) ), this, SLOT( updateRowSelection( int ) ) );
connect( mModel, SIGNAL( modelChanged() ), this, SLOT( updateSelection() ) );
//make sure to show all recs on first load
on_cbxShowSelectedOnly_toggled( false );
mLastClickedHeaderIndex = 0;
mSelectionModel = new QItemSelectionModel( mFilterModel );
updateSelectionFromLayer();
//make sure to show all recs on first load
on_cbxShowSelectedOnly_toggled( false );
}
QgsAttributeTableDialog::~QgsAttributeTableDialog()
@ -220,6 +220,7 @@ void QgsAttributeTableDialog::on_cbxShowSelectedOnly_toggled( bool theFlag )
mFilterModel->invalidate();
//TODO: weird
//mModel->changeLayout();
updateSelection();
}
void QgsAttributeTableDialog::columnBoxInit()