From a38f161533ac6d0bb034f8291b5172580561e52c Mon Sep 17 00:00:00 2001 From: Joseph Bellahcen Date: Sat, 17 Jun 2023 19:40:09 -0700 Subject: [PATCH] Fixed double-assignment of ControlPanel signals Previously, each ControlPanelView initializer called its own reset() and configure() functions, but it is the job of the parent widget to call these after initialization. The result is that slots were connected twice, resulting in operations being carried out more than once --- src/User_Interfaces/Control_Panels/ControlPanelLpcView.cpp | 3 --- src/User_Interfaces/Control_Panels/ControlPanelPitchView.cpp | 3 --- src/User_Interfaces/Control_Panels/ControlPanelPostView.cpp | 3 --- 3 files changed, 9 deletions(-) diff --git a/src/User_Interfaces/Control_Panels/ControlPanelLpcView.cpp b/src/User_Interfaces/Control_Panels/ControlPanelLpcView.cpp index 88f7e01..c8003eb 100644 --- a/src/User_Interfaces/Control_Panels/ControlPanelLpcView.cpp +++ b/src/User_Interfaces/Control_Panels/ControlPanelLpcView.cpp @@ -35,9 +35,6 @@ ControlPanelLpcView::ControlPanelLpcView(QWidget *parent): ControlPanelView("LPC grid->addWidget(preemphCheckbox, row, 0); grid->addWidget(preemphLine, row, 1); - - configureSlots(); - reset(); } void ControlPanelLpcView::configureSlots() { diff --git a/src/User_Interfaces/Control_Panels/ControlPanelPitchView.cpp b/src/User_Interfaces/Control_Panels/ControlPanelPitchView.cpp index 4a04526..95932a2 100644 --- a/src/User_Interfaces/Control_Panels/ControlPanelPitchView.cpp +++ b/src/User_Interfaces/Control_Panels/ControlPanelPitchView.cpp @@ -44,9 +44,6 @@ ControlPanelPitchView::ControlPanelPitchView(QWidget *parent): ControlPanelView( grid->addWidget(minPitchLabel, row, 0); grid->addWidget(minPitchLine, row, 1); - - configureSlots(); - reset(); } void ControlPanelPitchView::configureSlots() { diff --git a/src/User_Interfaces/Control_Panels/ControlPanelPostView.cpp b/src/User_Interfaces/Control_Panels/ControlPanelPostView.cpp index 1b685df..52107b9 100644 --- a/src/User_Interfaces/Control_Panels/ControlPanelPostView.cpp +++ b/src/User_Interfaces/Control_Panels/ControlPanelPostView.cpp @@ -68,9 +68,6 @@ ControlPanelPostView::ControlPanelPostView(QWidget *parent): ControlPanelView("P grid->addWidget(maxVoicedGainLabel, row, 0); grid->addWidget(maxVoicedGainLine, row, 1); - - configureSlots(); - reset(); } void ControlPanelPostView::configureSlots() {