1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-18 17:10:55 +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 "../../../../HitTestResult.h"
#include "../../../../Project.h" #include "../../../../Project.h"
#include "../../../../RefreshCode.h" #include "../../../../RefreshCode.h"
#include "../../../../Snap.h" // for kPixelTolerance
#include "../../../../TrackPanelMouseEvent.h" #include "../../../../TrackPanelMouseEvent.h"
#include "../../../../UndoManager.h" #include "../../../../UndoManager.h"
#include "../../../../WaveTrack.h" #include "../../../../WaveTrack.h"
@ -77,8 +78,8 @@ namespace
if (x >= 0 && x < rect.width) if (x >= 0 && x < rect.width)
{ {
wxRect locRect; wxRect locRect;
locRect.x = (int)(rect.x + x) - 5; locRect.width = 2 * kPixelTolerance - 1;
locRect.width = 11; locRect.x = (int)(rect.x + x) - locRect.width / 2;
locRect.y = rect.y; locRect.y = rect.y;
locRect.height = rect.height; locRect.height = rect.height;
if (locRect.Contains(state.m_x, state.m_y)) if (locRect.Contains(state.m_x, state.m_y))