1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-26 15:03:47 +01:00

Move mdBr from TrackPanel to ViewInfo, no more lookup of prefs in Envelope.cpp

This commit is contained in:
Paul Licameli
2015-07-07 00:51:14 -04:00
parent edba89d704
commit 7bba4500c4
7 changed files with 30 additions and 36 deletions

View File

@@ -12,7 +12,9 @@ Paul Licameli
#include <algorithm>
#include "Envelope.h"
#include "Internat.h"
#include "Prefs.h"
#include "xml/XMLWriter.h"
namespace {
@@ -26,12 +28,18 @@ ZoomInfo::ZoomInfo(double start, double screenDuration, double pixelsPerSecond)
, screen(screenDuration)
, zoom(pixelsPerSecond)
{
UpdatePrefs();
}
ZoomInfo::~ZoomInfo()
{
}
void ZoomInfo::UpdatePrefs()
{
dBr = gPrefs->Read(wxT("/GUI/EnvdBRange"), ENV_DB_RANGE);
}
/// Converts a position (mouse X coordinate) to
/// project time, in seconds. Needs the left edge of
/// the track as an additional parameter.