diff widgets/LevelPanWidget.cpp @ 1201:a68c25ba1153 levelpanwidget

Fix incorrect initial display levels in LevelPanWidget
author Chris Cannam
date Fri, 16 Dec 2016 19:35:57 +0000
parents 91aac85406fb
children 8ef67917c301
line wrap: on
line diff
--- a/widgets/LevelPanWidget.cpp	Fri Dec 16 16:29:53 2016 +0000
+++ b/widgets/LevelPanWidget.cpp	Fri Dec 16 19:35:57 2016 +0000
@@ -43,6 +43,8 @@
     m_includeMute(true)
 {
     setToolTip(tr("Drag vertically to adjust level, horizontally to adjust pan"));
+    setLevel(1.0);
+    setPan(0.0);
 }
 
 LevelPanWidget::~LevelPanWidget()
@@ -124,7 +126,8 @@
 float
 LevelPanWidget::getLevel() const
 {
-    return levelToAudioLevel(m_level, m_includeMute);
+    float flevel = levelToAudioLevel(m_level, m_includeMute);
+    return flevel;
 }
 
 int
@@ -196,14 +199,12 @@
 void
 LevelPanWidget::emitLevelChanged()
 {
-    cerr << "emitting levelChanged(" << getLevel() << ")" << endl;
     emit levelChanged(getLevel());
 }
 
 void
 LevelPanWidget::emitPanChanged()
 {
-    cerr << "emitting panChanged(" << getPan() << ")" << endl;
     emit panChanged(getPan());
 }