Skip to content
Permalink
Browse files

Minor ui tweaks to afs source select dialog

(cherry picked from commit 0ba475b)
  • Loading branch information
nyalldawson committed Nov 7, 2018
1 parent 25faaa0 commit 3e67b1850633f3161c6b944678837c520f8184f1
Showing with 3 additions and 8 deletions.
  1. +3 −8 src/providers/arcgisrest/qgsarcgisservicesourceselect.cpp
@@ -91,6 +91,7 @@ QgsArcGisServiceSourceSelect::QgsArcGisServiceSourceSelect( const QString &servi
mModelProxy->setSourceModel( mModel );
mModelProxy->setSortCaseSensitivity( Qt::CaseInsensitive );
treeView->setModel( mModelProxy );
treeView->setSortingEnabled( true );

connect( treeView, &QAbstractItemView::doubleClicked, this, &QgsArcGisServiceSourceSelect::treeWidgetItemDoubleClicked );
connect( treeView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &QgsArcGisServiceSourceSelect::treeWidgetCurrentRowChanged );
@@ -265,16 +266,10 @@ void QgsArcGisServiceSourceSelect::connectToServer()

if ( haveLayers )
{
for ( int i = 0; i < treeView->header()->count(); ++i )
{
treeView->resizeColumnToContents( i );
if ( i < 2 && treeView->columnWidth( i ) > 300 )
{
treeView->setColumnWidth( i, 300 );
}
}
treeView->selectionModel()->select( mModel->index( 0, 0 ), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows );
treeView->setFocus();

treeView->sortByColumn( 0, Qt::AscendingOrder );
}
else
{

0 comments on commit 3e67b18

Please sign in to comment.
You can’t perform that action at this time.