mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-31 12:34:29 -04:00
fix butngrid/capture and fix contributor name (#1995)
* fixing contributor name * used clear instead of swap --------- Co-authored-by: GullCode <gullradriel@hotmail.com>
This commit is contained in:
parent
9e40e38f07
commit
01e4ff65a2
2 changed files with 6 additions and 4 deletions
|
@ -107,12 +107,14 @@ void BtnGridView::on_tick_second() {
|
|||
}
|
||||
|
||||
void BtnGridView::clear() {
|
||||
std::vector<GridItem>().swap(menu_items); // clear vector and release memory
|
||||
// clear vector and release memory, not using swap since it's causing capture to glitch/fault
|
||||
menu_items.clear();
|
||||
|
||||
for (auto& item : menu_item_views)
|
||||
remove_child(item.get());
|
||||
|
||||
std::vector<std::unique_ptr<NewButton>>().swap(menu_item_views); // clear vector and release memory
|
||||
// clear vector and release memory, not using swap since it's causing capture to glitch/fault
|
||||
menu_item_views.clear();
|
||||
}
|
||||
|
||||
void BtnGridView::add_items(std::initializer_list<GridItem> new_items) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue