Skip to content

Commit 1a5a23d

Browse files
committed
[postgres] Fix jumping item when changing pkey / geom type / srid
On change of on of the properties the affected item would suddenly jump to the end of the list.
1 parent c225f56 commit 1a5a23d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/providers/postgres/qgspgsourceselect.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ QgsPgSourceSelect::QgsPgSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsPr
253253
mProxyModel.setFilterCaseSensitivity( Qt::CaseInsensitive );
254254
mProxyModel.setSourceModel( &mTableModel );
255255

256+
// Do not do dynamic sorting - otherwise whenever user selects geometry type / srid / pk columns,
257+
// that item suddenly jumps to the end of the list (because the item gets changed) which is very annoying.
258+
// The list gets sorted in finishList() method when the listing of tables and views has finished.
259+
mProxyModel.setDynamicSortFilter( false );
260+
256261
mTablesTreeView->setModel( &mProxyModel );
257262
mTablesTreeView->setSortingEnabled( true );
258263
mTablesTreeView->setEditTriggers( QAbstractItemView::CurrentChanged );

0 commit comments

Comments
 (0)