From e55b0b7f376d0f89ed1410ce637d9e6903688e06 Mon Sep 17 00:00:00 2001 From: eelke Date: Sat, 5 Oct 2019 09:09:22 +0200 Subject: [PATCH] fix: update sql for indexes and constraints When another table is selected the index and constraint list are reloaded and have no selection. So the SQL for the selection should be empty. --- pglab/widgets/CatalogConstraintPage.cpp | 1 + pglab/widgets/CatalogIndexPage.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/pglab/widgets/CatalogConstraintPage.cpp b/pglab/widgets/CatalogConstraintPage.cpp index 26d12a9..752be3a 100644 --- a/pglab/widgets/CatalogConstraintPage.cpp +++ b/pglab/widgets/CatalogConstraintPage.cpp @@ -26,6 +26,7 @@ void CatalogConstraintPage::setFilter(const std::optional &cls) { m_constraintModel->setData(m_catalog, cls); m_tableView->resizeColumnsToContents(); + m_definitionView->setPlainText({}); } void CatalogConstraintPage::tableView_selectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/) diff --git a/pglab/widgets/CatalogIndexPage.cpp b/pglab/widgets/CatalogIndexPage.cpp index 99bc789..25cafec 100644 --- a/pglab/widgets/CatalogIndexPage.cpp +++ b/pglab/widgets/CatalogIndexPage.cpp @@ -26,6 +26,7 @@ void CatalogIndexPage::setFilter(const std::optional &cls) { m_indexModel->setData(m_catalog, cls); m_tableView->resizeColumnsToContents(); + m_definitionView->setPlainText({}); } void CatalogIndexPage::tableView_selectionChanged(const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/)