mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Use ExtendedSelection mode in MSSQL and DB2 source select
This commit is contained in:
parent
916529fd4b
commit
d49742dd40
@ -184,9 +184,7 @@ QgsDb2SourceSelect::QgsDb2SourceSelect( QWidget *parent, Qt::WindowFlags fl, Qgs
|
||||
connect( mTablesTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsDb2SourceSelect::treeWidgetSelectionChanged );
|
||||
|
||||
QgsSettings settings;
|
||||
mTablesTreeView->setSelectionMode( settings.value( QStringLiteral( "qgis/addDb2DC" ), false ).toBool() ?
|
||||
QAbstractItemView::ExtendedSelection :
|
||||
QAbstractItemView::MultiSelection );
|
||||
mTablesTreeView->setSelectionMode( QAbstractItemView::ExtendedSelection );
|
||||
|
||||
|
||||
//for Qt < 4.3.2, passing -1 to include all model columns
|
||||
@ -318,15 +316,7 @@ void QgsDb2SourceSelect::mTablesTreeView_clicked( const QModelIndex &index )
|
||||
|
||||
void QgsDb2SourceSelect::mTablesTreeView_doubleClicked( const QModelIndex &index )
|
||||
{
|
||||
QgsSettings settings;
|
||||
if ( settings.value( QStringLiteral( "qgis/addDb2DC" ), false ).toBool() )
|
||||
{
|
||||
addButtonClicked();
|
||||
}
|
||||
else
|
||||
{
|
||||
setSql( index );
|
||||
}
|
||||
addButtonClicked();
|
||||
}
|
||||
|
||||
void QgsDb2SourceSelect::mSearchGroupBox_toggled( bool checked )
|
||||
|
@ -190,9 +190,7 @@ QgsMssqlSourceSelect::QgsMssqlSourceSelect( QWidget *parent, Qt::WindowFlags fl,
|
||||
connect( mTablesTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsMssqlSourceSelect::treeWidgetSelectionChanged );
|
||||
|
||||
QgsSettings settings;
|
||||
mTablesTreeView->setSelectionMode( settings.value( QStringLiteral( "qgis/addMSSQLDC" ), false ).toBool() ?
|
||||
QAbstractItemView::ExtendedSelection :
|
||||
QAbstractItemView::MultiSelection );
|
||||
mTablesTreeView->setSelectionMode( QAbstractItemView::ExtendedSelection );
|
||||
|
||||
|
||||
//for Qt < 4.3.2, passing -1 to include all model columns
|
||||
@ -317,15 +315,7 @@ void QgsMssqlSourceSelect::mTablesTreeView_clicked( const QModelIndex &index )
|
||||
|
||||
void QgsMssqlSourceSelect::mTablesTreeView_doubleClicked( const QModelIndex &index )
|
||||
{
|
||||
QgsSettings settings;
|
||||
if ( settings.value( QStringLiteral( "qgis/addMSSQLDC" ), false ).toBool() )
|
||||
{
|
||||
addButtonClicked();
|
||||
}
|
||||
else
|
||||
{
|
||||
setSql( index );
|
||||
}
|
||||
addButtonClicked();
|
||||
}
|
||||
|
||||
void QgsMssqlSourceSelect::mSearchGroupBox_toggled( bool checked )
|
||||
|
Loading…
x
Reference in New Issue
Block a user