-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow for asynchronous inspector updates #24863
Allow for asynchronous inspector updates #24863
Conversation
0a8e0ff
to
04c32d2
Compare
This looks good to me now! Are you planning to make further changes in this PR, or is it time to mark it 'ready for review' so that I can approve it? |
I don’t have any further changes planned. |
@bluebear94 please rebase your PR to fix the red vtests, thanks! |
0309173
to
a7694ae
Compare
Tested on Win10, Mac13.6, LinuxUbuntu24.04.1 LTS @bluebear94 Sorry for delay in testing. I found a regression on Mac with Inspector updating when using select all and switching between panels
Screen.Recording.2024-10-23.at.16.38.51.2.mp4 |
Perhaps need to call |
@DmitryArefiev I don’t have macOS, so let me know if one of @cbjeukendrup’s suggestions fixes the issue for you. |
@bluebear94 I'm not a developer (can't change the code on my side).. You can push those suggestions sequentially and I'll check it on macOS |
I’ve pushed the first suggestion; let me know whether it fixes the bug on macOS. |
@bluebear94 I tried it out and this seems to work for me. However, I noticed some QML warnings, and some more code that turns out to become redundant given your changes, so I created a few commits here: master...cbjeukendrup:MuseScore:properties/optimisations Additionally, it would be good to rebase your PR branch: |
This allows object creation to be asynchronous when specified. We use the controller from the main window.
Replace the StyledFlickable + Repeater with a StyledListView as suggested by @cbjeukendrup.
|
now that it uses ListView
Usually, QML ListView will guess the height of the entire list content based on the list items that are currently inside the viewport. In the case of the properties panel, that doesn't work well, because the different sections have very different heights. That can lead to jumping during scrolling. Setting `cacheBuffer` to `contentHeight` prevents this. Note that this is normally completely against the principle of ListView, because it means in practice that all items will always be instantiated instead of only those inside the viewport, but in the case of the properties panel, that's okay, because we're using ListView for its asynchrony, not for its viewport-only efficiency.
e61ad49
to
762c6ec
Compare
@bluebear94 @cbjeukendrup Ready for testing? |
Should be. |
Good. This issue #24863 (comment) no longer occurs on macOS Tested on Win10, Mac13.6, LinuxUbuntu24.04.1 LTS - PASS |
@bluebear94 thank you so much! |
Resolves: #14383
Previously, updating the inspector model would cause QML components to be created synchronously, causing a delay when selecting certain elements.
We set an incubation controller on theTo avoid blocking the main thread when updating the inspector, we also replace theQQmlEngine
to allow for objects to be created asynchronously when requested.StyledFlickable
+Repeater
combo with aStyledListView
.Current bugs: the space above the separator lines is missing