File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -791,13 +791,15 @@ void projectM::populatePresetMenu()
791791 if (isTextInputActive ()) {
792792 // if a searchTerm is active, we will populate the preset menu with search terms instead of the page we are on.
793793 int h = 0 ;
794+ std::string presetName = renderer->presetName ();
795+ int presetIndex = getSearchIndex (presetName);
794796 for (unsigned int i = 0 ; i < getPlaylistSize (); i++) { // loop over all presets
795797 if (getPresetName (i).find (renderer->searchText ()) != std::string::npos) { // if term matches
796798 if (h < renderer->textMenuPageSize ) // limit to just one page, pagination is not needed.
797799 {
798800 h++;
799801 renderer->m_presetList .push_back ({ h, getPresetName (i), " " }); // populate the renders preset list.
800- if (h == getSearchIndex (renderer-> presetName ()) )
802+ if (h == presetIndex )
801803 {
802804 renderer->m_activePresetID = h;
803805 }
You can’t perform that action at this time.
0 commit comments