MCPcopy Create free account
hub / github.com/audacity/audacity / TransferGraphLimitsFromWindow

Method TransferGraphLimitsFromWindow

src/effects/ScienFilter.cpp:297–341  ·  view source on GitHub ↗

Retrieve data from the window

Source from the content-addressed store, hash-verified

295// Retrieve data from the window
296//
297bool EffectScienFilter::TransferGraphLimitsFromWindow()
298{
299 // Read the sliders and send to the panel
300 wxString tip;
301
302 bool rr = false;
303 int dB = mdBMinSlider->GetValue();
304 if (dB != mdBMin) {
305 rr = true;
306 mdBMin = dB;
307 tip.Printf(_("%d dB"), (int)mdBMin);
308 mdBMinSlider->SetToolTip(tip);
309 }
310
311 dB = mdBMaxSlider->GetValue();
312 if (dB != mdBMax) {
313 rr = true;
314 mdBMax = dB;
315 tip.Printf(_("%d dB"),(int)mdBMax);
316 mdBMaxSlider->SetToolTip(tip);
317 }
318
319 if (rr) {
320 mPanel->SetDbRange(mdBMin, mdBMax);
321 }
322
323 // Refresh ruler if values have changed
324 if (rr) {
325 int w1, w2, h;
326 mdBRuler->ruler.GetMaxSize(&w1, &h);
327 mdBRuler->ruler.SetRange(mdBMax, mdBMin);
328 mdBRuler->ruler.GetMaxSize(&w2, &h);
329 if( w1 != w2 ) // Reduces flicker
330 {
331 mdBRuler->SetSize(wxSize(w2,h));
332 mUIParent->Layout();
333 mfreqRuler->Refresh(false);
334 }
335 mdBRuler->Refresh(false);
336 }
337
338 mPanel->Refresh(false);
339
340 return true;
341}
342
343void EffectScienFilter::OnOrder(wxCommandEvent & WXUNUSED(evt))
344{

Callers

nothing calls this directly

Calls 9

wxSizeClass · 0.50
GetValueMethod · 0.45
SetToolTipMethod · 0.45
SetDbRangeMethod · 0.45
GetMaxSizeMethod · 0.45
SetRangeMethod · 0.45
SetSizeMethod · 0.45
LayoutMethod · 0.45
RefreshMethod · 0.45

Tested by

no test coverage detected