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

BreakpointWidget: Add ability to directly edit breakpoints #12780

Merged

Conversation

TryTwo
Copy link
Contributor

@TryTwo TryTwo commented May 14, 2024

BP_EDITOR

Add theme-aware buttons, ability to edit addresses, and a popup for conditional editing.

If a base address is changed, it will delete the breakpoint and then create a new breakpoint at the new address. Useful for moving a conditional to another address.

Removed selecting rows, which breaks the old delete button. Delete moved to context menu.

This new style can result in new odd states for breakpoints. Such as a Memory Breakpoint that is enabled, but has Read + Write disabled, resulting in nothing being done. Previously Read and/or Write would always be true. Not sure it matters.

If the buttons are no good, they can be replaced with 3-state combo boxes. Break/Log/B+L.

@TryTwo TryTwo force-pushed the BreakpointWidget_Direct_Edit branch from 853e88f to e326228 Compare May 14, 2024 23:21
@dreamsyntax
Copy link
Member

I'm really liking it so far.

image

The only thing I'm iffy on is in the case of the memory breakpoints, as you called out in your initial post.

Would it be possible to give a 'disabled' tint state to a row that wont ever result in a hit?

@TryTwo
Copy link
Contributor Author

TryTwo commented May 18, 2024

I added it. Note that changing Dark/Light style doesn't send a signal to update, so you have to manually cause the widget to update if you want to test both styles.

@dreamsyntax
Copy link
Member

dreamsyntax commented May 18, 2024

I added it. Note that changing Dark/Light style doesn't send a signal to update, so you have to manually cause the widget to update if you want to test both styles.

image

This is actually not what I meant. But this is a good change in any case.
I meant the entire row of a BP state that will never result in a hit.

Per my screenshot above, I would expect row2 to be entirely grayed out as the 'active' is not checked.
Similarly if active is checked, but no read/write is checked, it should also be grayed out.

The idea was to indicate if a current BP is 'inactive' by implicit state - as this sort of solves the case of weird BP configurations and not realizing it.

@TryTwo
Copy link
Contributor Author

TryTwo commented May 19, 2024

Oh, my bad. That's a nice idea to deal with weird states in the UI, if the text is still readable. I wonder if I can do it without setting the color for each cell.

@dreamsyntax
Copy link
Member

Yeah, im not sure if its feasible. Was just an idea.

That aside, ive been using this build for a while now, its really a great improvement as is.

@TryTwo TryTwo force-pushed the BreakpointWidget_Direct_Edit branch from dbacd53 to dbacb60 Compare May 23, 2024 04:48
Copy link
Member

@dreamsyntax dreamsyntax left a comment

Choose a reason for hiding this comment

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

Tested latest commit (dbacb60) a bunch in real world usage.

LGTM. While it would be nice to handle what we discussed above, it's not really detrimental to usage as is.
Maybe in a future PR.

I think this is worth merging as is.

@TryTwo TryTwo force-pushed the BreakpointWidget_Direct_Edit branch from dbacb60 to f86a5a7 Compare May 25, 2024 19:11
@TryTwo
Copy link
Contributor Author

TryTwo commented May 25, 2024

image

@dreamsyntax
Copy link
Member

dreamsyntax commented May 25, 2024

<image of row disabling/colors>

Did you not push your latest change? It doesn't seem to be working like that for me.

image

@TryTwo TryTwo force-pushed the BreakpointWidget_Direct_Edit branch 2 times, most recently from 3372654 to bebbadc Compare May 26, 2024 01:11
Copy link
Member

@dreamsyntax dreamsyntax left a comment

Choose a reason for hiding this comment

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

I've been using this for about 2 weeks, with the latest (disable state UI state adjustment) for about a week. It's overall a much better debugging UX.

Thoroughly tested the disable color states for MBP. Everything looks good to me. I think this should be merged.

@TryTwo
Copy link
Contributor Author

TryTwo commented Jun 1, 2024

@sepalani Are you interested in reviewing?

@AdmiralCurtiss
Copy link
Contributor

Squashed the fixup commits. I haven't tested this but if you say it works fine I'll believe you, it seems like a massive usability improvement.

…nd fix OnContextMenu which relied on select rows.

Add functions to edit breakpoints.
(bug?) Does not update on dark/light style change, as no signals are sent.
@AdmiralCurtiss AdmiralCurtiss merged commit 46a8993 into dolphin-emu:master Jun 1, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants