New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for TCP/MCP track spacers when acquiring context/track from mouse position #1787
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! MCP and TCP seems to work perfectly.
Arrange view is incorrect if the first track has a spacer (and the master track is hidden). TranslatePointToArrangeScrollY
's 0 point gets offset by one spacer size by CF_GetScrollInfo
.
diff --git a/cfillion/cfillion.cpp b/cfillion/cfillion.cpp
index a6f77d93..f409efd8 100644
--- a/cfillion/cfillion.cpp
+++ b/cfillion/cfillion.cpp
@@ -479,6 +479,7 @@ BOOL CF_GetScrollInfo(HWND hwnd, const int bar, LPSCROLLINFO si)
MediaTrack *track { CSurf_TrackFromID(i, false) };
if(TcpVis(track)) {
si->nPos = -static_cast<int>(GetMediaTrackInfo_Value(track, "I_TCPY"));
+ si->nPos += GetTrackSpacerSize(track);
si->fMask &= ~SIF_POS;
break;
}
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and seems to work well. Could you squash the commits?
…om mouse position
2875f08
to
7481dc7
Compare
@cfillion done. |
✅ Build sws 970-master completed (commit f324193d97 by @jeremybernstein) Windows 64-bitWindows 32-bitmacOS x86 64-bitmacOS x86 32-bitmacOS ARM 64-bitLinux x86 64-bitLinux x86 32-bitLinux ARM 64-bitLinux ARM 32-bit |
Testing the SWS beta bulid. This action is not working properly: If i want to resize a track that is just below a track spacer, it only increases the track height with mousewheel up, but with mousewheel down, it also tries to increase the height in minimal steps, and after it gets resized i can't even get back to normal size, even with built in commands like: View: Toggle track zoom to minimum height It works correctly if i assign a Midi CC, it only has this error with mousewheel down. |
I am seeing issues with this action with or without track spacers. We can look into it, thanks for the report. |
- SWS/wol: Adjust selected envelope or last touched track height - SWS/wol: Adjust envelope or track height under mouse cursor reaper-oss#1787 (comment) Add GetTrackHeightWithSpacer() GetTrackHeight() is now balanced to SetTrackHeight(), as previously -- it will get the 'content' portion height and offset of the track in the TCP. If you need the true track offset (- spacerSize) or height (+ spacerSize), use GetTrackHeightAndOffsetWithSpacers(). Updated a couple of Zoom.cpp functions to take the spacer size into account, missed on the first pass.
GetTrackHeight return value includes spacer height.
Issue #1761