From fdb59cf6e9ec44f6489829f04d48d226443d4849 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sun, 2 Dec 2018 03:37:56 +0000 Subject: [PATCH] Fix a cardinality issue in the contest and Fox log windows for the Band column Foreign key relationship with the Bands model should have been many-to-many instead of one-to-many. --- widgets/CabrilloLogWindow.cpp | 2 +- widgets/FoxLogWindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/CabrilloLogWindow.cpp b/widgets/CabrilloLogWindow.cpp index 20f39e4e6..4bf70f805 100644 --- a/widgets/CabrilloLogWindow.cpp +++ b/widgets/CabrilloLogWindow.cpp @@ -66,7 +66,7 @@ CabrilloLogWindow::CabrilloLogWindow (QSettings * settings, Configuration const set_log_view (m_->ui_.log_table_view); m_->ui_.log_table_view->setItemDelegateForColumn (2, new DateTimeAsSecsSinceEpochDelegate {this}); m_->ui_.log_table_view->setItemDelegateForColumn (3, new CallsignDelegate {this}); - m_->ui_.log_table_view->setItemDelegateForColumn (6, new ForeignKeyDelegate {configuration->bands (), m_->log_model_, 0, 6, this}); + m_->ui_.log_table_view->setItemDelegateForColumn (6, new ForeignKeyDelegate {configuration->bands (), 0, this}); m_->ui_.log_table_view->horizontalHeader ()->moveSection (6, 1); // band to first column } diff --git a/widgets/FoxLogWindow.cpp b/widgets/FoxLogWindow.cpp index 0f96529aa..4b8fbc253 100644 --- a/widgets/FoxLogWindow.cpp +++ b/widgets/FoxLogWindow.cpp @@ -43,7 +43,7 @@ FoxLogWindow::FoxLogWindow (QSettings * settings, Configuration const * configur m_->ui_.log_table_view->setItemDelegateForColumn (1, new DateTimeAsSecsSinceEpochDelegate {this}); m_->ui_.log_table_view->setItemDelegateForColumn (2, new CallsignDelegate {this}); m_->ui_.log_table_view->setItemDelegateForColumn (3, new MaidenheadLocatorDelegate {this}); - m_->ui_.log_table_view->setItemDelegateForColumn (6, new ForeignKeyDelegate {configuration->bands (), m_->log_model_, 0, 6, this}); + m_->ui_.log_table_view->setItemDelegateForColumn (6, new ForeignKeyDelegate {configuration->bands (), 0, this}); m_->ui_.log_table_view->horizontalHeader ()->moveSection (6, 1); // move band to first column m_->ui_.rate_label->setNum (0); m_->ui_.queued_label->setNum (0);