Skip to content
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

Unified range checking behavior for BeatJumpSize and BeatLoopSize between GUI-Widget and controller CO #11248

Merged

Conversation

JoergAtGithub
Copy link
Member

@JoergAtGithub JoergAtGithub commented Feb 4, 2023

The check is moved therefore from the widget to the engine code.

Closes: #11203

… between GUI-Widget and controller CO, by moving the check from the widget to the engine.
@github-actions github-actions bot added the ui label Feb 4, 2023
@JoergAtGithub JoergAtGithub marked this pull request as ready for review February 5, 2023 00:37
@JoergAtGithub JoergAtGithub force-pushed the unify_beatjumpandloopsize_rangecheck branch from 17cb4c2 to 28d705d Compare February 6, 2023 23:57
@ronso0
Copy link
Member

ronso0 commented Feb 16, 2023

@JoergAtGithub I'll take a look soonish.

Copy link
Member

@ronso0 ronso0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except for some spots, LGTM

edit need to take a closer look at the tests, and a manual test is still pending

src/test/looping_control_test.cpp Show resolved Hide resolved
src/engine/controls/loopingcontrol.cpp Outdated Show resolved Hide resolved
@ronso0
Copy link
Member

ronso0 commented Mar 22, 2023

I just did another manual test (with Shade btw) and I encountered some strange issues with the loop size spinbox:

  • strange size reset (I couldn't reproduce it, occured only once during the first test):
    • loop size is 4
    • type 320, hit Enter (tracks are focused)
    • click on loop_double
    • = size was reset to 4??
  • strange size clamping (could reproduce it during one session with different values 100-255 but not afterwards):
    • enter 321, hit Enter
    • click Up button = nothing happened ✔️
    • click Down key = resized to 160 1/2 ✔️
    • hit Up key = nothing happened ❌

Both issues occured with no tracks loaded though I think that shouldn't matter).
After that, everything worked as expected, both with keyboard Up/Down, spinbox buttons and double/halve COs. So maybe there's something wrong with the key events or spinbox buttons, idk, very mysterious.

@ronso0
Copy link
Member

ronso0 commented Mar 22, 2023

So basically, LGTM, ready for merged.
While trying to debug the isseus mentioned above I stumbled over this comment

// Curiously, m_valueControl.set() does not cause slotControlValueChanged
// to execute for beatjump_size, so call QDoubleSpinBox::setValue in this function.
m_valueControl.set(newValue);
double coValue = m_valueControl.get();
if (coValue != value()) {
setValue(coValue);
}

I did a quick test with some debug messages and I'm pretty sure this part can be removed to avoid the extra round so it's just

    // comment...
    m_valueControl.set(newValue);
    selectAll();

@JoergAtGithub
Copy link
Member Author

Thanks for testing.
I aggree that

double coValue = m_valueControl.get();
if (coValue != value()) {
setValue(coValue);
}
shouldn't be needed.
How should we proceed?

@ronso0
Copy link
Member

ronso0 commented Mar 22, 2023

Can you remove that snippet? Then I can press merge.

I cannot reproduce the issue I saw, and --looking at the code-- I have no idea where that should come from. Maybe concurrent calls to loopingcontrol due to the snippet above 🤷 (though it was the beatloop size not the beatjump size as the comment states)

@JoergAtGithub
Copy link
Member Author

I removed these lines - and a short GUI test with Latenight showed the same correct behavior as before.

@ronso0 ronso0 merged commit 0e7601c into mixxxdj:2.4 Mar 23, 2023
@ronso0
Copy link
Member

ronso0 commented Mar 23, 2023

Thanks for fixing this!

@JoergAtGithub JoergAtGithub deleted the unify_beatjumpandloopsize_rangecheck branch March 24, 2023 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants