mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Massive ~2500% speed improvement for OptionListComponent.
This commit is contained in:
parent
3233288a8c
commit
3d6628f084
|
@ -39,10 +39,11 @@ public:
|
|||
|
||||
void setNeedsSaving() { mNeedsSaving = true; }
|
||||
|
||||
void addRow(const ComponentListRow& row, bool setCursorHere = false)
|
||||
void addRow(const ComponentListRow& row, bool setCursorHere = false, bool updateRowSize = true)
|
||||
{
|
||||
mList->addRow(row, setCursorHere);
|
||||
updateSize();
|
||||
if (updateRowSize)
|
||||
updateSize();
|
||||
}
|
||||
|
||||
void addWithLabel(const std::string& label,
|
||||
|
|
|
@ -409,7 +409,7 @@ private:
|
|||
}
|
||||
|
||||
// Also set cursor to this row if we're not multi-select and this row is selected.
|
||||
mMenu.addRow(row, (!mParent->mMultiSelect && it->selected));
|
||||
mMenu.addRow(row, (!mParent->mMultiSelect && it->selected), false);
|
||||
}
|
||||
|
||||
mMenu.addButton("BACK", "back", [this] { delete this; });
|
||||
|
|
Loading…
Reference in a new issue