Mercurial > hg > svgui
comparison widgets/LevelPanToolButton.cpp @ 1266:a34a2a25907c
Untabify
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 18:02:22 +0000 |
parents | 8ef67917c301 |
children | 1589bc7528b7 |
comparison
equal
deleted
inserted
replaced
1265:6e724c81f18f | 1266:a34a2a25907c |
---|---|
139 | 139 |
140 void | 140 void |
141 LevelPanToolButton::selfLevelChanged(float level) | 141 LevelPanToolButton::selfLevelChanged(float level) |
142 { | 142 { |
143 if (level > 0.f) { | 143 if (level > 0.f) { |
144 m_muted = false; | 144 m_muted = false; |
145 } else { | 145 } else { |
146 m_muted = true; | 146 m_muted = true; |
147 m_savedLevel = 1.f; | 147 m_savedLevel = 1.f; |
148 } | 148 } |
149 update(); | 149 update(); |
150 } | 150 } |
151 | 151 |
152 void | 152 void |
153 LevelPanToolButton::selfClicked() | 153 LevelPanToolButton::selfClicked() |
154 { | 154 { |
155 if (m_muted) { | 155 if (m_muted) { |
156 m_muted = false; | 156 m_muted = false; |
157 m_lpw->setLevel(m_savedLevel); | 157 m_lpw->setLevel(m_savedLevel); |
158 emit levelChanged(m_savedLevel); | 158 emit levelChanged(m_savedLevel); |
159 } else { | 159 } else { |
160 m_savedLevel = m_lpw->getLevel(); | 160 m_savedLevel = m_lpw->getLevel(); |
161 m_muted = true; | 161 m_muted = true; |
162 m_lpw->setLevel(0.f); | 162 m_lpw->setLevel(0.f); |
163 emit levelChanged(0.f); | 163 emit levelChanged(0.f); |
164 } | 164 } |
165 update(); | 165 update(); |
166 } | 166 } |
167 | 167 |
168 void | 168 void |