Skip to content

Commit 9bfc3b8

Browse files
author
wonder
committed
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/qgis@10784 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent c27da1f commit 9bfc3b8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app/attributetable/qgsattributetabledialog.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
103103
connect( mView->verticalHeader(), SIGNAL( sectionClicked( int ) ), this, SLOT( updateRowSelection( int ) ) );
104104
connect( mModel, SIGNAL( modelChanged() ), this, SLOT( updateSelection() ) );
105105

106-
//make sure to show all recs on first load
107-
on_cbxShowSelectedOnly_toggled( false );
108-
109106
mLastClickedHeaderIndex = 0;
110107
mSelectionModel = new QItemSelectionModel( mFilterModel );
111108
updateSelectionFromLayer();
109+
110+
//make sure to show all recs on first load
111+
on_cbxShowSelectedOnly_toggled( false );
112112
}
113113

114114
QgsAttributeTableDialog::~QgsAttributeTableDialog()
@@ -220,6 +220,7 @@ void QgsAttributeTableDialog::on_cbxShowSelectedOnly_toggled( bool theFlag )
220220
mFilterModel->invalidate();
221221
//TODO: weird
222222
//mModel->changeLayout();
223+
updateSelection();
223224
}
224225

225226
void QgsAttributeTableDialog::columnBoxInit()

0 commit comments

Comments
 (0)