1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-12 06:37:52 +02:00

Same tolerance for hitting clip boundaries as for selection snap

This commit is contained in:
Paul Licameli 2017-07-15 14:12:32 -04:00
parent 89c8e8ac39
commit d3572ebe10

View File

@ -17,6 +17,7 @@ Paul Licameli split from TrackPanel.cpp
#include "../../../../HitTestResult.h"
#include "../../../../Project.h"
#include "../../../../RefreshCode.h"
#include "../../../../Snap.h" // for kPixelTolerance
#include "../../../../TrackPanelMouseEvent.h"
#include "../../../../UndoManager.h"
#include "../../../../WaveTrack.h"
@ -77,8 +78,8 @@ namespace
if (x >= 0 && x < rect.width)
{
wxRect locRect;
locRect.x = (int)(rect.x + x) - 5;
locRect.width = 11;
locRect.width = 2 * kPixelTolerance - 1;
locRect.x = (int)(rect.x + x) - locRect.width / 2;
locRect.y = rect.y;
locRect.height = rect.height;
if (locRect.Contains(state.m_x, state.m_y))