From 5d729ac4f5d27e06a2b3703eee0d4843179dcc1a Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Mon, 15 Aug 2016 23:18:40 +0200 Subject: [PATCH] No need to search views for foreign keys This simplifies and optimises the foreign key check when editing a table field a little. --- src/EditTableDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EditTableDialog.cpp b/src/EditTableDialog.cpp index 9877845f..84c459b7 100644 --- a/src/EditTableDialog.cpp +++ b/src/EditTableDialog.cpp @@ -231,7 +231,7 @@ void EditTableDialog::itemChanged(QTreeWidgetItem *item, int column) // When editing an exiting table, check if any foreign keys would cause trouble in case this name is edited if(!m_bNewTable) { - foreach(const DBBrowserObject& fkobj, pdb->getBrowsableObjects()) + foreach(const DBBrowserObject& fkobj, pdb->objMap.values("table")) { foreach(const sqlb::FieldPtr& fkfield, fkobj.table.fields()) {