Skip to content

Commit

Permalink
Fix "Add" button in database add layer dialogs is sometimes disabled
Browse files Browse the repository at this point in the history
even when a layer is selected
  • Loading branch information
nyalldawson committed Oct 4, 2018
1 parent 7ac86d2 commit 64e561c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions src/providers/db2/qgsdb2sourceselect.cpp
Expand Up @@ -657,10 +657,9 @@ void QgsDb2SourceSelect::setSearchExpression( const QString &regexp )
Q_UNUSED( regexp );
}

void QgsDb2SourceSelect::treeWidgetSelectionChanged( const QItemSelection &selected, const QItemSelection &deselected )
void QgsDb2SourceSelect::treeWidgetSelectionChanged( const QItemSelection &, const QItemSelection & )
{
Q_UNUSED( deselected )
emit enableButtons( !selected.isEmpty() );
emit enableButtons( !mTablesTreeView->selectionModel()->selection().isEmpty() );
}


Expand Down
5 changes: 2 additions & 3 deletions src/providers/mssql/qgsmssqlsourceselect.cpp
Expand Up @@ -739,10 +739,9 @@ void QgsMssqlSourceSelect::setSearchExpression( const QString &regexp )
Q_UNUSED( regexp );
}

void QgsMssqlSourceSelect::treeWidgetSelectionChanged( const QItemSelection &selected, const QItemSelection &deselected )
void QgsMssqlSourceSelect::treeWidgetSelectionChanged( const QItemSelection &, const QItemSelection & )
{
Q_UNUSED( deselected )
emit enableButtons( !selected.isEmpty() );
emit enableButtons( !mTablesTreeView->selectionModel()->selection().isEmpty() );
}

void QgsMssqlSourceSelect::showHelp()
Expand Down
5 changes: 2 additions & 3 deletions src/providers/oracle/qgsoraclesourceselect.cpp
Expand Up @@ -674,10 +674,9 @@ void QgsOracleSourceSelect::loadTableFromCache()
finishList();
}

void QgsOracleSourceSelect::treeWidgetSelectionChanged( const QItemSelection &selected, const QItemSelection &deselected )
void QgsOracleSourceSelect::treeWidgetSelectionChanged( const QItemSelection &, const QItemSelection & )
{
Q_UNUSED( deselected )
emit enableButtons( !selected.isEmpty() );
emit enableButtons( !mTablesTreeView->selectionModel()->selection().isEmpty() );
}

void QgsOracleSourceSelect::showHelp()
Expand Down
5 changes: 2 additions & 3 deletions src/providers/spatialite/qgsspatialitesourceselect.cpp
Expand Up @@ -583,10 +583,9 @@ void QgsSpatiaLiteSourceSelect::setSearchExpression( const QString &regexp )
Q_UNUSED( regexp );
}

void QgsSpatiaLiteSourceSelect::treeWidgetSelectionChanged( const QItemSelection &selected, const QItemSelection &deselected )
void QgsSpatiaLiteSourceSelect::treeWidgetSelectionChanged( const QItemSelection &, const QItemSelection & )
{
Q_UNUSED( deselected )
emit enableButtons( !selected.isEmpty() );
emit enableButtons( !mTablesTreeView->selectionModel()->selection().isEmpty() );
}

void QgsSpatiaLiteSourceSelect::showHelp()
Expand Down

0 comments on commit 64e561c

Please sign in to comment.