Preset Browser doesn't update after expansion change
-
The presets of each expansion (within the floating tile preset browser) are not updated after the expansion change using ExpansionHandler.setCurrentExpansion(expansion). It only changes after building the project again.
I tried with FloatingTile.changed() and FloatingTile.sendRepaintMessage() but nothing.HiseSnippet 1867.3ocsX0saabbEdVIuNlLIHIn8AXAuhJPfljVhVtAAklThIJQxlPTMNAtFNC2cVxsd4LamcnkDLTQtrWlGg9Jzq6yQ6yQtKW5dNyrb2Y4O9GgjEFxXlyOy2424LbnT3yRSERhS0yuJgQb9H2QWwUS6OkFwIGeHw4CcOdFcB6bVphz6pDZZJKf33r8WgL3T4VD82u7m6QiobeVwVDx2Ih7YmDMKRUr6vteaTb7.Z.67nYVbuW2i8E79hXwb.La61jjP8eAbvOhhrskK4qooSINetqOsYmP+wOHrIq88CCFe+wr81m8f.1C5bf+9gGr+A2qM6dGzg3b6iBhTB4HEUwRIN2pmH3pQSEWvMGv2EkFMNlgKZQFAmrY6Ah3.zDwcI8mFEGLbgWJk.ZYXgOaaiO6O5dZTPT99E9tOUSvqPBaGnyVkg21kfWKa30zBdqARNVP5VFH8Yti7kQIpBJYwRthICoPbxFJFdIa8e+.29BfCtpwL5KXCjvhbIp2pY681069cNXmunJ7c265Mholm3olx7XWlP4oQBtWbTpxKhq20WLarXr3xpUgXKr8KoRjyulxChYRuuz6H9jHNqgujA9fiVniL50wyojfFxXFQJH7SeFPu7tMRlmNsdsGI7xUVMTKgBYcFhphSuwDlJmoS.PWemcp5AeqSiLjavWlvjpHVZ8cZfDAMiBXCxbMNhEy7gnKfyEtTPE8EyRDbXQ8ZqvIBzU1rQJC3MRwlkVa2kg1eSDwqW6uBlHZiP733YIwrYf5WJljdQjxeZ0pQ7Xvc6ENm6qv8E7UNPDrRQbc+EHcWvthmy1o5qpVIV3SiKz64hSDz.vByYFswiAvdN6REF9pTsB.qmv7tflApvHIle.73oDdRFXelTk4RIB7bkqkLU3cAyiyXAH29So7IPXTgKnPvbVh5JuTkLhOoZknv5qfrubIW1Sa9L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QkKSX.8kBI35vGwZSav733gT0zEzSK4IxLniAmU.qmPBtjRzez7YF+GJVK8Vl0OASCNCxXD.gmpuarYi6sz2tum6Ca+L8YfuF5gvSxxcoYmvtq6+xkxfryDWLjFfSl9tJWtOsG1iDszmZHbpPlEFVlRQp2xTV3mWgZ0qIjUelL7.cQv7Xpp7q1weaiLBXUs8SkwmCCgK0U12O8a1S4eWg3m4NDeQ25w3VqAivUm+dfwre.jO18nvPn6aA.uk6fu+2mesCxYh4XmxSov69vtsPQxHnakOCNcNz7FGvwYKrArYcSbM5AFw3A5EuF9xH1BW6jQr0BhPebeo349lAXvehk6n2AvDWeKeE2Sw0dsVdVEBYVTPzy88KqpUDr8MUv6cSEbuapf6eSEryMUv6eSE7f2tf3OH2CmqDyLkMDxoCORe2liyQbJjApyVI+eZ54IbB
-
@bendurso If I reset the preset browser like this, it seems to work.. is it a good approach? Or there is a better way?
FloatingTile.set("ContentType", ""); FloatingTile.set("ContentType", "PresetBrowser");
-
@bendurso Actually, this works... but I realized that the search bar only functions if I select the expansion manually in the preset browser (and I'm not using ShowExpansionsAsColumn).
When I change the expansion using Engine.setCurrentExpansion or ExpansionHandler.setCurrentExpansion, the search bar in the preset browser doesn't work.
This makes me think that the expansion isn't being updated properly.
Any ideas on how to update the expansion in the preset browser without using the expansion column, and still have the search bar work?
-
@bendurso said in Preset Browser doesn't update after expansion change:
Any ideas on how to update the expansion in the preset browser
I don't think you can. You'd need to modify the source code.
-
Doesn't this mean it updates the preset browser with the selected expansion?
-
@bendurso That implies it would, but maybe it only works if the expansion column is visible.
-
@d-healey Oh yeah, that was the problem.
I changed the expansionPackLoaded from PresetBrowser.cpp from this
void PresetBrowser::expansionPackLoaded(Expansion* currentExpansion) { refreshColumnUpdatesAfterExpansionSwitch = true; if(expansionColumn != nullptr && currentExpansion != nullptr) selectionChanged(-1, -1, currentExpansion->getRootFolder(), false); else selectionChanged(-1, -1, File(), false); }
to this:
void PresetBrowser::expansionPackLoaded(Expansion* currentExpansion) { refreshColumnUpdatesAfterExpansionSwitch = true; if(currentExpansion != nullptr) selectionChanged(-1, -1, currentExpansion->getRootFolder(), false); else selectionChanged(-1, -1, File(), false); }
And now it works without the expansion column:)
-
@d-healey Oh and the favorites are working now too! Amazing! That was the problem too.
-
@bendurso Might be good to make a pull request on that, I can't see any down side
-
@d-healey Oh, I don't know how to make a github request
-
@bendurso Commit it to your working branch. Then checkout Christoph's develop branch. Then create a new branch (it will use Christoph's as the base). Then cherry-pick your commit onto that new branch and push it to github. Then go to github to create the PR.
I think I showed this recently in the modding the preset browser video (might only be on Patreon).
-
@d-healey Oh nice thanks I will check it, i'm a patreon :)