diff --git a/include/SetupDialog.h b/include/SetupDialog.h index 871a80bcd..af9bd8a88 100644 --- a/include/SetupDialog.h +++ b/include/SetupDialog.h @@ -72,7 +72,6 @@ protected slots: private slots: // General settings widget. - void toggleDisplaydBFS(bool enabled); void toggleTooltips(bool enabled); void toggleDisplayWaveform(bool enabled); void toggleNoteLabels(bool enabled); @@ -134,7 +133,6 @@ private: TabBar * m_tabBar; // General settings widgets. - bool m_displaydBFS; bool m_tooltips; bool m_displayWaveform; bool m_printNoteLabels; diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index d3c973020..5e6f3c267 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -126,6 +126,7 @@ void ConfigManager::upgrade_1_1_90() void ConfigManager::upgrade_1_1_91() { // rename displaydbv to displaydbfs + // Note: the value of "displaydbfs" is not evaluated anymore! if (!value("app", "displaydbv").isNull()) { setValue("app", "displaydbfs", value("app", "displaydbv")); diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 48d2ddb30..cf5700ba7 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -1099,13 +1099,7 @@ void MainWindow::updateViewMenu() // Here we should put all look&feel -stuff from configmanager // that is safe to change on the fly. There is probably some // more elegant way to do this. - auto qa = new QAction(tr("Volume as dBFS"), this); - qa->setData("displaydbfs"); - qa->setCheckable( true ); - qa->setChecked( ConfigManager::inst()->value( "app", "displaydbfs" ).toInt() ); - m_viewMenu->addAction(qa); - - qa = new QAction(tr( "Smooth scroll" ), this); + auto qa = new QAction(tr( "Smooth scroll" ), this); qa->setData("smoothscroll"); qa->setCheckable( true ); qa->setChecked( ConfigManager::inst()->value( "ui", "smoothscroll" ).toInt() ); @@ -1135,12 +1129,7 @@ void MainWindow::updateConfig( QAction * _who ) QString tag = _who->data().toString(); bool checked = _who->isChecked(); - if( tag == "displaydbfs" ) - { - ConfigManager::inst()->setValue( "app", "displaydbfs", - QString::number(checked) ); - } - else if ( tag == "tooltips" ) + if ( tag == "tooltips" ) { ConfigManager::inst()->setValue( "tooltips", "disabled", QString::number(!checked) ); diff --git a/src/gui/modals/SetupDialog.cpp b/src/gui/modals/SetupDialog.cpp index d71ede03f..be32ab46a 100644 --- a/src/gui/modals/SetupDialog.cpp +++ b/src/gui/modals/SetupDialog.cpp @@ -91,8 +91,6 @@ inline void labelWidget(QWidget * w, const QString & txt) SetupDialog::SetupDialog(ConfigTab tab_to_open) : - m_displaydBFS(ConfigManager::inst()->value( - "app", "displaydbfs").toInt()), m_tooltips(!ConfigManager::inst()->value( "tooltips", "disabled").toInt()), m_displayWaveform(ConfigManager::inst()->value( @@ -231,8 +229,6 @@ SetupDialog::SetupDialog(ConfigTab tab_to_open) : QGroupBox * guiGroupBox = new QGroupBox(tr("Graphical user interface (GUI)"), generalControls); QVBoxLayout * guiGroupLayout = new QVBoxLayout(guiGroupBox); - addCheckBox(tr("Display volume as dBFS "), guiGroupBox, guiGroupLayout, - m_displaydBFS, SLOT(toggleDisplaydBFS(bool)), true); addCheckBox(tr("Enable tooltips"), guiGroupBox, guiGroupLayout, m_tooltips, SLOT(toggleTooltips(bool)), true); addCheckBox(tr("Enable master oscilloscope by default"), guiGroupBox, guiGroupLayout, @@ -913,8 +909,6 @@ void SetupDialog::accept() from taking mouse input, rendering the application unusable. */ QDialog::accept(); - ConfigManager::inst()->setValue("app", "displaydbfs", - QString::number(m_displaydBFS)); ConfigManager::inst()->setValue("tooltips", "disabled", QString::number(!m_tooltips)); ConfigManager::inst()->setValue("ui", "displaywaveform", @@ -1003,12 +997,6 @@ void SetupDialog::accept() // General settings slots. -void SetupDialog::toggleDisplaydBFS(bool enabled) -{ - m_displaydBFS = enabled; -} - - void SetupDialog::toggleTooltips(bool enabled) { m_tooltips = enabled; diff --git a/src/gui/widgets/Fader.cpp b/src/gui/widgets/Fader.cpp index b0fc24076..1fdbb9b04 100644 --- a/src/gui/widgets/Fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -375,7 +375,7 @@ void Fader::setPeak_R(float fPeak) // update tooltip showing value and adjust position while changing fader value void Fader::updateTextFloat() { - if (ConfigManager::inst()->value("app", "displaydbfs").toInt() && m_conversionFactor == 100.0) + if (m_conversionFactor == 100.0) { s_textFloat->setText(getModelValueAsDbString()); } diff --git a/src/gui/widgets/FloatModelEditorBase.cpp b/src/gui/widgets/FloatModelEditorBase.cpp index ebd0d3d9d..e85ca1a50 100644 --- a/src/gui/widgets/FloatModelEditorBase.cpp +++ b/src/gui/widgets/FloatModelEditorBase.cpp @@ -390,8 +390,7 @@ void FloatModelEditorBase::enterValue() bool ok; float new_val; - if (isVolumeKnob() && - ConfigManager::inst()->value("app", "displaydbfs").toInt()) + if (isVolumeKnob()) { auto const initalValue = model()->getRoundedValue() / 100.0; auto const initialDbValue = initalValue > 0. ? ampToDbfs(initalValue) : -96; @@ -444,8 +443,7 @@ void FloatModelEditorBase::friendlyUpdate() QString FloatModelEditorBase::displayValue() const { - if (isVolumeKnob() && - ConfigManager::inst()->value("app", "displaydbfs").toInt()) + if (isVolumeKnob()) { auto const valueToVolumeRatio = model()->getRoundedValue() / volumeRatio(); return m_description.trimmed() + (