Fix for #8964: Properties Panel empty when no score open - #17278
Conversation
|
I can't figure out how to run uncrustify, any help would be appreciated with that (or just let me know what the style issue is) |
|
You don't really need to run uncrustify yourself, just make the code changes proposed by the codestyle check diff --git a/src/inspector/models/inspectorlistmodel.cpp b/src/inspector/models/inspectorlistmodel.cpp
index 82ab4bc..68d80f2 100644
--- a/src/inspector/models/inspectorlistmodel.cpp
+++ b/src/inspector/models/inspectorlistmodel.cpp
@@ -70,7 +70,7 @@ void InspectorListModel::buildModelsForEmptySelection()
removeUnusedModels({}, false /*isRangeSelection*/);
return;
}
-
+
removeUnusedModels({}, false /*isRangeSelection*/, persistentSectionList);
createModelsBySectionType(persistentSectionList);It basically is a tab or a couple spaces too much |
|
Also please squash two commits about codestayle into other commits where you did these changes |
|
Thank you for taking a look at it! I'm currently travelling, will fix when I get back to my computer. |
Whenever the "Properties" panel is being rebuilt because nothing is selected, it checks if a score is open, and if not, then the Properties panel doesn't build any rows (i.e. it stays empty). This check triggers whenever the selected element changes from 'something' to 'nothing'. codestyle fix I didn't realize that there was a default argument for removeUnusedModels, now it's using it musescore#17278 (comment)
b3f99c8 to
22e983e
Compare
|
@zacjansheski Hi! Can you test this on Mac and Win please? |
|
It seems that the "Invisible", "Formatting", and "Frames" eyes have behavior that is the opposite of what is expected (those elements become visible when the eye icon is closed and vice versa), but I don't know why this is the case. If I select something on the score and return to empty selection, the eye icons go back to behaving normally. If I close the score and reopen a new one, they are wrong again. Is there something unique that happens when these panels are populated for the first time or when they are populated with no score? Is the "Page margins" eye different? I don't know why that one seems to work when the others don't. |
|
Re: the last commit, I'm guessing that when a new score is opened (or the panel is created for the first time), each "model" in the properties panel is created with the constructor, but subsequent uses of the model just updates it instead of creating a new one. This doesn't explain why it works properly on the nightly build though, so I think I'm still missing something. |
|
@AnnikaLevesque Could you please rebase this PR? That may (should) solve the mysterious failing vtests. |
Whenever the "Properties" panel is being rebuilt because nothing is selected, it checks if a score is open, and if not, then the Properties panel doesn't build any rows (i.e. it stays empty). This check triggers whenever the selected element changes from 'something' to 'nothing'.
d40fea0 to
f2d9051
Compare
|
Tested on MacOS 11.6.5, Ubuntu 20.04.6 LTS, and Windows 11. Works well! |


Resolves: #8964
In response to #8964 (comment), the modules in the Properties Panel that have no effect when no score is open will no longer appear when no score is open. They will appear when a score is opened and nothing is selected, and disappear again if (all) score(s) are closed.
I built RUN_TESTS, and the only failing tests seemed to be unrelated ones, such as audio tests and braille tests.