1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-02 08:03:48 +02:00

Shrink the zone for vertical ruler zooming for NoteTrack too

This commit is contained in:
Paul Licameli 2017-12-23 22:50:06 -05:00
parent db45280695
commit f3a05540b0
3 changed files with 10 additions and 6 deletions

View File

@ -33,11 +33,14 @@ std::vector<UIHandlePtr> NoteTrackVRulerControls::HitTest
{
std::vector<UIHandlePtr> results;
UIHandlePtr result;
auto track = std::static_pointer_cast<NoteTrack>(FindTrack());
result = NoteTrackVZoomHandle::HitTest(
mVZoomHandle, st.state, track, st.rect);
if (result)
results.push_back(result);
if ( st.state.GetX() <= st.rect.GetRight() - kGuard ) {
auto track = std::static_pointer_cast<NoteTrack>(FindTrack());
result = NoteTrackVZoomHandle::HitTest(
mVZoomHandle, st.state, track, st.rect);
if (result)
results.push_back(result);
}
auto more = TrackVRulerControls::HitTest(st, pProject);
std::copy(more.begin(), more.end(), std::back_inserter(results));

View File

@ -32,7 +32,6 @@ std::vector<UIHandlePtr> WaveTrackVRulerControls::HitTest
{
std::vector<UIHandlePtr> results;
const int kGuard = 5; // 5 pixels to reduce risk of VZooming accidentally
if ( st.state.GetX() <= st.rect.GetRight() - kGuard ) {
auto pTrack = Track::Pointer<WaveTrack>( FindTrack().get() );
if (pTrack) {

View File

@ -17,6 +17,8 @@ Paul Licameli split from TrackPanel.cpp
class Track;
class wxDC;
const int kGuard = 5; // 5 pixels to reduce risk of VZooming accidentally
class TrackVRulerControls /* not final */ : public CommonTrackPanelCell
{
public: