Fix the same panel layout creation bug but for maps
This commit is contained in:
parent
c85f920e70
commit
3606069b89
@ -11,13 +11,12 @@ namespace MusicSelect {
|
||||
if (not panels.empty()) {
|
||||
std::vector<jbcoe::polymorphic_value<Panel>> current_column;
|
||||
current_column.emplace_back(CategoryPanel{resources, category});
|
||||
for (auto &&panel : panels) {
|
||||
for (auto& panel : panels) {
|
||||
if (current_column.size() == 3) {
|
||||
push_back({current_column[0], current_column[1], current_column[2]});
|
||||
current_column.clear();
|
||||
} else {
|
||||
current_column.push_back(std::move(panel));
|
||||
}
|
||||
current_column.push_back(panel);
|
||||
}
|
||||
if (not current_column.empty()) {
|
||||
while (current_column.size() < 3) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user