diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 356cb3cde..d243c8912 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -748,8 +748,6 @@ void TrackPanel::UpdatePrefs() { gPrefs->Read(wxT("/GUI/AutoScroll"), &mViewInfo->bUpdateTrackIndicator, true); - gPrefs->Read(wxT("/GUI/AdjustSelectionEdges"), &mAdjustSelectionEdges, - true); gPrefs->Read(wxT("/GUI/CircularTrackNavigation"), &mCircularTrackNavigation, false); gPrefs->Read(wxT("/GUI/Solo"), &mSoloPref, wxT("Simple")); @@ -1587,7 +1585,7 @@ void TrackPanel::SetCursorAndTipWhenSelectTool( Track * t, //Make sure we are within the selected track // Adjusting the selection edges can be turned off in // the preferences... - if ( !t->GetSelected() || !mAdjustSelectionEdges) + if ( !t->GetSelected() || !mViewInfo->bAdjustSelectionEdges) { MaySetOnDemandTip( t, tip ); return; @@ -2191,7 +2189,7 @@ void TrackPanel::SelectionHandleClick(wxMouseEvent & event, if (pTrack && pTrack->GetSelected()) { // Adjusting selection edges can be turned off in the // preferences now - if (mAdjustSelectionEdges) { + if (mViewInfo->bAdjustSelectionEdges) { #ifdef EXPERIMENTAL_SPECTRAL_EDITING if (mFreqSelMode == FREQ_SEL_SNAPPING_CENTER && isSpectralSelectionTrack(pTrack)) { @@ -2256,7 +2254,7 @@ void TrackPanel::SelectionHandleClick(wxMouseEvent & event, wxASSERT(false); } } - } // mAdjustSelectionEdges + } // mViewInfo->bAdjustSelectionEdges } #ifdef USE_MIDI diff --git a/src/TrackPanel.h b/src/TrackPanel.h index a28848a91..b6b74f725 100644 --- a/src/TrackPanel.h +++ b/src/TrackPanel.h @@ -808,7 +808,6 @@ protected: enum MouseCaptureEnum mMouseCapture; virtual void SetCapturedTrack( Track * t, enum MouseCaptureEnum MouseCapture=IsUncaptured ); - bool mAdjustSelectionEdges; bool mSlideUpDownOnly; bool mCircularTrackNavigation; diff --git a/src/ViewInfo.cpp b/src/ViewInfo.cpp index c357f68ed..f3ec6bd5f 100644 --- a/src/ViewInfo.cpp +++ b/src/ViewInfo.cpp @@ -151,7 +151,8 @@ void ViewInfo::UpdatePrefs() gPrefs->Read(TracksBehaviorsPrefs::ScrollingPreferenceKey(), &bScrollBeyondZero, TracksBehaviorsPrefs::ScrollingPreferenceDefault()); #endif - + gPrefs->Read(wxT("/GUI/AdjustSelectionEdges"), &bAdjustSelectionEdges, + true); } void ViewInfo::SetBeforeScreenWidth(wxInt64 beforeWidth, wxInt64 screenWidth, double lowerBoundTime) diff --git a/src/ViewInfo.h b/src/ViewInfo.h index 2bffb400f..e5dc80ce0 100644 --- a/src/ViewInfo.h +++ b/src/ViewInfo.h @@ -180,6 +180,7 @@ public: bool bUpdateTrackIndicator; bool bScrollBeyondZero; + bool bAdjustSelectionEdges; // During timer update, grab the volatile stream time just once, so that // various other drawing code can use the exact same value.