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

move ordering to waveformmarkset #12237

Merged
merged 3 commits into from
Nov 7, 2023
Merged

Conversation

m0dB
Copy link
Contributor

@m0dB m0dB commented Oct 29, 2023

This is a basically a code quality refactoring, but has the added bonus of fixing an inconsistency between the waveform overview and the waveform viewer.

WOverview had both a member WaveformMarkSet m_marks and a member m_marksToRender (a sorted map of the visible marks) , and code to update the second. This functionality makes more sense to live inside WaveformMarkSet.

With this refactoring, WOverview only has WaveformMarkSet m_marks, and when iteratoring over m_marks, this will be over the sorted marks to render, and WOverview doesn't need to know anything about this.

As a bonus, WaveformRenderMark, now uses the some ordering as WOverview (I believe there was a bug about this, or maybe a discussion in zulip, but I can't find it).

@m0dB m0dB requested review from Swiftb0y and daschuer October 29, 2023 20:34
@github-actions github-actions bot added the ui label Oct 29, 2023
src/waveform/renderers/waveformmarkset.cpp Outdated Show resolved Hide resolved
src/waveform/renderers/waveformmarkset.cpp Outdated Show resolved Hide resolved
src/widget/woverview.cpp Outdated Show resolved Hide resolved
@m0dB m0dB force-pushed the waveformmarkset-ordered branch 2 times, most recently from fc01e45 to 725eb69 Compare November 5, 2023 12:14
@m0dB
Copy link
Contributor Author

m0dB commented Nov 5, 2023

still making some improvement post-merge.

@Swiftb0y
Copy link
Member

Swiftb0y commented Nov 5, 2023

fyi, a renaming is probably in order too, since mathematical sets don't have a concept of ordering...

…, hover in waveformviewer in reverse draw order
@m0dB m0dB force-pushed the waveformmarkset-ordered branch from 725eb69 to 2245220 Compare November 6, 2023 08:45
@m0dB
Copy link
Contributor Author

m0dB commented Nov 6, 2023

All comments have been addressed, @Swiftb0y

There is still room for more refactoring (but isn't there always 😄?) but I don't want to go there now. I left a TODO comment though.

@Swiftb0y
Copy link
Member

Swiftb0y commented Nov 6, 2023

also, would you mind looking into the pre-commit failure? I think its just a whitespace issue.

@m0dB
Copy link
Contributor Author

m0dB commented Nov 6, 2023

also, would you mind looking into the pre-commit failure? I think its just a whitespace issue.

Sure, will do, though I'd like to understand how it is possible to commit things that fail, while using pre-commit locally.

DONE

Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you. I highly value your refactoring contributions.

@Swiftb0y Swiftb0y merged commit 5454b94 into mixxxdj:2.4 Nov 7, 2023
11 checks passed
@m0dB m0dB deleted the waveformmarkset-ordered branch November 7, 2023 22:52
@ronso0
Copy link
Member

ronso0 commented Nov 12, 2023

Sure, will do, though I'd like to understand how it is possible to commit things that fail, while using pre-commit locally.

Same here.
In particular I'm struggling with the qml check which sporadically finds errors in untouched qml files. Didn't find a pattern, yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants