No need to search views for foreign keys

This simplifies and optimises the foreign key check when editing a table
field a little.
This commit is contained in:
Martin Kleusberg
2016-08-15 23:18:40 +02:00
parent 014174bc26
commit 5d729ac4f5

View File

@@ -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())
{