1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-20 15:41:18 +01:00

[Bug 647] Snap-To clicks find nearest snap point, not nearest previous.

Convert SnapTo from on/off to a choice of off/nearest/prior.
This commit is contained in:
lllucius
2013-11-01 14:13:39 +00:00
parent 05302d7483
commit ce00d5b507
7 changed files with 95 additions and 39 deletions

View File

@@ -23,6 +23,13 @@
class TrackClipArray;
enum
{
SNAP_OFF,
SNAP_NEAREST,
SNAP_PRIOR
};
class SnapPoint {
public:
SnapPoint(double t, Track *track) {
@@ -53,6 +60,11 @@ class SnapManager {
bool *snappedPoint,
bool *snappedTime);
static wxArrayString GetSnapLabels();
static wxArrayString GetSnapValues();
static const wxString & GetSnapValue(int index);
static int GetSnapIndex(const wxString & value);
private:
void CondListAdd(double t, Track *tr);
double Get(int index);